My goal is to check for SQL return code, so that I can execute a ROLLBACK or COMMIT depending on SQL return code, but I'm not getting the result I want. Somebody here knows how to do it?
//JOBX001 EXEC DB2TTSO
//*
//DB2TTSO2.SYSTSPRT DD SYSOUT=*
//DB2TTSO2.SYSPRINT DD SYSOUT=*
//*
//DB2TTSO2.SYSIN DD DATA,DLM=$$
UPDATE PROD1.CUSTOMER_VWLOG
SET CUSTNBR = '0012354'
WHERE SQE_NBR = 11;
$$
//*
//*--------------------------------------------------------------------
//JOBX002 EXEC PGM=PNOTIFY,
// COND=(0,EQ,JOBX001.DB2TTSO2),
// PARM='1500 *** TABLE UPDATE FAILED ***'
//*--------------------------------------------------------------------
//*
//DB2TTSO2.SYSTSPRT DD SYSOUT=*
//DB2TTSO2.SYSPRINT DD SYSOUT=*
//*
//DB2TTSO2.SYSIN DD DATA,DLM=$$
UPDATE PROD1.CUSTOMER_VWLOG
SET CUSTNBR = '0012354'
WHERE SQE_NBR = 11;
$$
//*
//*--------------------------------------------------------------------
//JOBX002 EXEC PGM=PNOTIFY,
// COND=(0,EQ,JOBX001.DB2TTSO2),
// PARM='1500 *** TABLE UPDATE FAILED ***'
//*--------------------------------------------------------------------