Anyone have a suggestion for a bare bones monitoring software. I don't really need anything terribly fancy, just something to text me if there's an error on the system.
Thanks!
Thanks!
/* +
Test job MSGW status... +
+
Program requires a *MSGQ in MYLIB named MSGW. Use CRTMSGQ to create +
the *MSGQ, then use SBMJOB to call this program. The program will +
wait up to five minutes for you to send a message to that *MSGQ. +
You can use SNDMSG to send the message. +
+
While the program is waiting, the job will be in MSGW status. When +
a message is found or the five minutes expires, the program will +
send an *INQ message to MYLIB/MSGW with SNDUSRMSG. While waiting +
for a reply, the job will again be in MSGW status. When the reply +
is received, a second *INQ message is sent to MYLIB/MSGW with +
RPYMSGQ( &JobUsr ). The expected reply is redirected to the user +
message queue of the job running this program. This job will not be +
in MSGW and will end. +
*/
pgm
dcl &TstMsgL *char 10 value( 'MYLIB ' )
dcl &TstMsgQ *char 10 value( 'MSGW ' )
dcl &JobUsr *char 10
dcl &REPLY *char
rtvjoba user( &JobUsr )
rcvmsg msgq( &TstMsgL/&TstMsgQ ) wait( 300 )
sndusrmsg msg( 'Enter FIRST reply' ) +
msgtype( *INQ ) +
tomsgq( &TstMsgL/&TstMsgQ ) +
msgrpy( &REPLY )
sndmsg msg( 'Enter SECOND reply' ) +
tomsgq( &TstMsgL/&TstMsgQ ) +
msgtype( *INQ ) +
rpymsgq( &JobUsr )
return
endpgm
Comment