On Thu, 21 Jul 2016 14:36:30 +0200, R.S. <[email protected]> wrote:
>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.** ... >... > >Let's say second command fails (RDEF PROFILE2) so, script is aborted, >RDEF PROFILE3 is not issued. > >Any clue? First, that's not a CLIST (as implied in your subject line). It's merely a list of TSO commands. If it were a CLIST, then possibly using the WHEN command after each command could solve your problem. It is documented as working after CALL and LOADGO commands, but might work after other commands, too. WHEN (SYSRC > 0) END would be useful in a CLIST if it works after other commands. Even without it being a CLIST, WHEN might work, but I can't run an experiment to find out. Perhaps WHEN (SYSRC > 0) LOGOFF would do it? -- Walt ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
