Christine_Chavez_6412

U0020261 Error in Script 'JOBS.MYJOB': Error Number X in ':STOP MSG' not allowed

Discussion created by Christine_Chavez_6412 on Oct 3, 2016

In STOP MSG, you can only use error numbers 50-59.

So if you are using the return code in the STOP MSG, you are likely to run into this error, where X is any number that is not between 50-59.

Instead of:
:SET &RETCODE# = GET_UC_OBJECT_STATUS(JOBS,&ACTOBJ#, "RETCOD:astonished: :STOP MSG, &RETCODE#, "Error processing JOBS.MAILAGENT.STATEMENT_EMAIL_JCMOVEIT_146_CHECK"

Capture the &RETCODE# and assign an error number for it.

Example:
:SET &RETCODE# = GET_UC_OBJECT_STATUS(JOBS,&ACTOBJ#, "RETCODE") :IF &RETCODE# = "2"
:SET &ERRORNO# = 50
:ELSE
:SET &ERRORNO# = 51
:ENDIF
:STOP MSG, &ERRORNO#, "Error processing JOBS.MAILAGENT.STATEMENT_EMAIL_JCMOVEIT_146_CHECK"

Outcomes