Problem solve Get help with specific problems with your technologies, process and projects.

Notifying the operators of any error message even if they are not SIGNED ON

If you want the operators to be notified of an error message your application encounters, you send a message to the message queue QSYSOPR. But what if they are not signed on the system and an immediate response is required on that particular message. Here is what you can do to send messages to System operator if they are not signed on their terminal/console.

Lets say the name of display file is ERROR and display device ID of system operator is DSP01. After compiling the Display file issue the following command before compiling CL program:


After issuing this command compile the CL program.

Now, whenever you want to give a error message to QSYSOPR message queue, call this program too with appropriate message of proper variable length (70 in this example).

 Display file name : ERROR

A                                      DSPSIZ(24 80 *DS3)          
A*%%TS  SD  20010521  115451  RAVI        REL-V4R4M0  5769-PW1         
A          R ZSYSVA                                   
A                                  2 33'Error Screen'                  
A            ER            70A  O  9  6DSPATR(HI)                      
A                                      DSPATR(BL)                      
A                                 23 45'Press ENTER for SIGN ON screen'

CL Program :

PGM         PARM(&ERR)

DCL     &ERR    *CHAR   70




MONMSG  CPF4128    /*already signed on  */


Dig Deeper on RPG iSeries programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.