Guild Companies, Inc.  
 
Midrange Guru - Tech Tips
OS/400 Edition
Volume 2, Number 17 - March 6, 2002

Display Break Messages on the Bottom Line

Hey, Ted:

At the shop where I used to work, break messages didn't interrupt my terminal session; instead, they showed up on the bottom line of the display. I never knew how this was done. Someone else set it up for everybody, and I was always too busy to see how that was done.

Now, I've changed jobs and break messages are driving me nuts. Do you know how to display break messages on the bottom line?

-- James

Yes, James. I also do not like to be interrupted by break messages. I think it was Trevor Seeny who showed me how to do this several years ago, and I've been using this technique since.

First, create a program to handle break messages. Here's the one I'm using on the NetShare/400 machine.







/* program to handle break messages */                     
 PGM        PARM(&MSGQ &MSGQLIB &MSGK)                      
                                                            
 DCL        VAR(&MSGQ) TYPE(*CHAR) LEN(10)                  
 DCL        VAR(&MSGQLIB) TYPE(*CHAR) LEN(10)               
 DCL        VAR(&MSGK) TYPE(*CHAR) LEN(4)                   
 DCL        VAR(&MSGDTA) TYPE(*CHAR) LEN(132)               
 DCL        VAR(&MSGID) TYPE(*CHAR) LEN(7)                  
 DCL        VAR(&MSGF) TYPE(*CHAR) LEN(10)                  
 DCL        VAR(&MSGFLIB) TYPE(*CHAR) LEN(10)               
 DCL        VAR(&MSGTXT) TYPE(*CHAR) LEN(132) 
                                                            
 /* receive the break message */                            
 RCVMSG     MSGQ(&MSGQLIB/&MSGQ) MSGKEY(&MSGK) RMV(*NO) +   
              MSGDTA(&MSGDTA) MSGID(&MSGID) MSGF(&MSGF) +   
              SNDMSGFLIB(&MSGFLIB) MSG(&MSGTXT)

IF         COND(&MSGID = ' ') THEN(DO)
/* if there’s no msgid, use &msgtxt and CPF9897 */
/* to satisfy status message requirements */
CHGVAR     VAR(&MSGID) VALUE('CPF9897') 
CHGVAR     VAR(&MSGFLIB) VALUE('QSYS')  
CHGVAR     VAR(&MSGF) VALUE('QCPFMSG')  
CHGVAR     VAR(&MSGDTA) VALUE(&MSGTXT)  
ENDDO

 /* resend it as a status message */                        
 SNDPGMMSG  MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) +            
              MSGDTA(&MSGDTA) TOPGMQ(*EXT) MSGTYPE(*STATUS) 
MONMSG     MSGID(CPF0000) 
ENDPGM                    

Give this program a meaningful name (perhaps something like MSGH, for message handler) and compile it using Create CL Program (CRTCLPGM) command.

Next, determine the name of your user profile's message queue. Your message queue is probably named the same as your user profile, because the default value for the MSGQ parameter of the Create User Profile (CRTUSRPRF) command is *USRPRF. If you're in doubt, use the Display User Profile (DSPUSRPRF) command to see what message queue you're using.

Every time you sign on, you have to tell the system that this program is going to handle break messages for your user profile's message queue. To do that, I added the following line to my initial program. I'm referring to the one specified in the INLPGM parameter of the Create User Profile (CRTUSRPRF) command.

CHGMSGQ    MSGQ(THOLT) DLVRY(*BREAK) PGM(MSGH)

If you don't have your own initial program, but have to share one with other people, maybe you could create your own initial program that changes the message queue and then calls the shared initial program.

-- Ted

Sponsored By
WORKSRIGHT SOFTWARE INC.

CASS Certification

What is it?

Why do you need it?

CASS stands for Coding Accuracy Support System. This is a test developed by the US Postal Service to determine whether ZIP Code software can accurately assign ZIP Codes to mailing addresses. CASS-certified software is intended to improve the accuracy of carrier route, 5-digit ZIP, ZIP+4, and delivery point codes.

CASS certified means the software has passed the test. When you use CASS software to update and maintain your mailing file, your mailing file becomes CASS certified. What does this mean to you?

CASS certification is the first step in qualifying for postage discounts. Look at the mail you receive at home and at work; you will see that a lot of it was mailed for less than the regular 34-cent rate.

If your company sends out a lot of mail, there is a good chance CASS certification can cut your postage expense. There are other steps you must perform to get these discounts, but CASS is the first step.

Exactly what happens when you process your mailing files with CASS software? The software breaks the address down into its individual elements: state, city, street name, and so forth. Then the information is compared to the national ZIP+4 database. If a match is found, the ZIP Code, ZIP+4, delivery point, and carrier route are assigned. Also the delivery line is standardized to comply with Postal Service preferences.

If an address can't be matched, no action is taken. This has the positive effect of allowing you to identify addresses in your mailing files which possibly can't be delivered, will be delayed in delivery, or at the very minimum need some minor correction to one of the address elements.

Using CASS certified software has many side benefits. You will be able to identify addresses that are potentially undeliverable. It has been estimated that as much as 30 percent of all advertising mail is never delivered.

That means the costs of postage, printing, paper, and overhead for the undelivered mail are wasted. If you spend $100,000 on a direct mail campaign, as much as $30,000 could be completely wasted.

CASS software provides a number of intangible benefits. With CASS certification and barcoding there is a good likelihood that that your mail will be delivered sooner. If your invoices are delivered one day sooner, you may receive payment one day sooner.

The bottom line is that using CASS software will help you keep your customers' address information in much better shape than they would be otherwise. Your mail may be delivered sooner at less cost, and that means more bottom-line dollars for your company.

If you would like more information about CASS and CASS software visit our Web site or contact WorksRight Software, Inc. at 601-856-8337.

THIS ISSUE
SPONSORED BY:
iSeries Nation
WorksRight Software, Inc.
BACK ISSUES
TABLE OF CONTENTS
Global Substitution in OS/400 IFS Files
Display Break Messages on the Bottom Line
Reader Feedback and Insights: We Don't Like Ops Console
  Newsletters | Subscribe | Advertise | About Us | Contact | Search | Home  
  Last Updated: 3/06/02
Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.