If you have a program that you know causes an error message, and the program does a monitor message so that it ends without error, but you want Robot Schedule to think the job ended abnormally anyway, execute the following:

SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('message text'TOPMQ(*PRV *) MSGTYPE(*ESCAPE)

This forces an escape message to be sent to RBT164, which will in turn force the job to end abnormally or end with a code of T.

Example

SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...
100 PGM /*EXAMPLE PROGRAM OF HOW TO MAKE ROBOT TERMINATE ABNORMALLY, EVEN */
200 /*THOUGH THIS PROGRAM WOULD END NORMALLY
300 ADDLIBLE LIB(ROBOTLIB)
400 MONMSG MSGID(CPF2103)
500
600 SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('test message') +
700 TOPGMQ(*PRV *) MSGTYPE(*ESCAPE)
800 ENDPGM

 

 


Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: March 08, 2018