On Fri, 7 Jan 2022 04:29:52 +0000, Nash, Jonathan S. wrote: > > ... I was just >working on some JCL and I had just assumed that I >could set symbolics using IF THEN ELSE ENDIF: > >// IF (STEP1.RC = 0) THEN >// SYMB=GOOD >// ELSE >// SYMB=BAD >// ENDIF > >but I found out that BOTH SET statements are executed >no matter what the return code is . > Even as in assembler it doesn't work to BC bypassing a SETC. The JCL Ref. is perhaps to specific in listing instructions that are not subject to IF ... ENDIF rather than describing which control the Converter and which control the Initiator.
>It also appears to me that I cannot put just one DD >within an IF statement. It looks an entire step has >to be in there... I think... > And it's truly confusing that if a DD statement is in a step bypassed by IF (or COND=) allocation, deletion, or cataloging is not performed but the ENQ SYSDSN is still issued. Would it be a favor to programmers to make misiplacing IF, etc. within a job step, or SET within IF ... ENDIF a syntax error? The effect is probably not what the programmers intend. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
