I would think putting your commands in a DATASET, then using REXX to execute them one at a time and check the return code would work.
If it is required to do it with a CLIST then the same logic would work. Lizette > -----Original Message----- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > Behalf Of R.S. > Sent: Thursday, July 21, 2016 5:37 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Kind of COND in a CLIST > > I'm going to submit huge command list in a batch (IKJEFT01). The commands are > unrelated (no loops, etc.) however I want to stop the script after command > failure, that means RC<>0. > > Example: > //STEP1 EXEC PGM=IKJEFT01 > //SYSTSPRT DD SYSOUT=* > //SYSTSIN DD *,DLM=@@ > /* command list */ > RDEF class PROFILE1.** ... > RDEF class PROFILE2.** ... > RDEF class PROFILE3.** ... > ... > PERMIT profile1.** ID(some grp) ACC(UPDATE) PERMIT profile2.** ID(some grp) > ACC(UPDATE) PERMIT profile3.** ID(some grp) ACC(UPDATE) ... > > Let's say second command fails (RDEF PROFILE2) so, script is aborted, RDEF > PROFILE3 is not issued. > > Any clue? > > -- > Radoslaw Skorupka > Lodz, Poland > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN