PGM DCL VAR(&TYPE) TYPE(*CHAR) LEN(1) DCL VAR(&SBMMSGQ) TYPE(*CHAR) LEN(10) DCL VAR(&SBMMSGQLIB) TYPE(*CHAR) LEN(10) RTVJOBA TYPE(&TYPE) SBMMSGQ(&SBMMSGQ) + SBMMSGQLIB(&SBMMSGLIB) IF COND(&TYPE = '0') THEN(DO) SNDPGMMSG MSG('COMPLETED AT BATCH JOB') + TOMSGQ(&SBMMSGQLIB/&SBMMSGQ) MSGTYPE(*COMP) ENDDO ELSE CMD(DO) SNDPGMMSG MSG('COMPETED AT INTERACTIVE') MSGTYPE(*COMP) ENDDO ENDPGM