firas400, see the attached code. Nothing elegant, but it does work. I simply sent each message to the user message queue, you could check the &RtnType field to identify the messages you want to act upon.
Code
firas400, see the attached code. Nothing elegant, but it does work. I simply sent each message to the user message queue, you could check the &RtnType field to identify the messages you want to act upon.
Code
One could do a CHGMSGQ to specify a program that gets called whenever a message arrives. you will have to put the message queue into *BREAK mode, specify the SMS sending program on the Message Queue definition, and eventually specufy the *ALWRPY parameter. CHGMSGQ MSGQ(QSYSOPR) DLVRY(*BREAK) PGM(MYLIB/MYPGM *ALWRPY)
Hello all need to read the qsysopr msgq in order to send special messages and alerts through SMS to mobile. is there anyway i can catch the message on the qsysopr depending on the msg description and then call the program to send it to mobile? thanks in advance
You could create a Monitor in iSeriesNavigator to monitor QSYSOPR MSGQ for various messages. When one of these messages is encountered, you specify a program to call. You can pass the MSGKEY to the CL program and RCVMSG from QSYSOPR to get more details on the message. Then you can call your mobile. Note, however, that you can't do a RVCMSG if the MSGQ is locked by another job. Worst case though, you could send a message that just says "Check QSYSOPR". Hope this helps, mary