In a CL program, you can use the RCVMSG command to read the messages in QSYSOPR.
A simple program to monitor for messages would be something like this:
DCL &MSG *CHAR 128
RCVMSG QSYSOPR WAIT(*MAX) MSG(&MSG)
your logic here - Either within this CL or call a program with &MSG as a parm.
Last Wiki Answer Submitted: October 8, 2012 6:39 pm by CharlieBrowne32,835 pts.