On Fri, 8 Nov 2013 09:06:20 -0600, Joel C. Ewing wrote:
>
>> ... "Placement in the JCL"  (from memory) ...
>
>"An IF/THEN/ELSE/ENDIF statement construct can appear anywhere in the
>job. However, an IF statement specified before the first EXEC statement
>in a job is not evaluated before the first step executes. If the IF
>statement applies to later steps in the job, the statement will be
>evaluated when the system decides whether to process the later steps."
> 
Thanks for jogging my memory; I stand corrected.

>So they don't disallow use of "IF" prior to first EXEC, it just works
>inconsistently (compared with usage of IF elsewhere).  ...
>
It's still BAD.  But what operand of IF can legally and usefully
be coded before the first EXEC?  One might imagine:

//* (Might come from an INCLUDE member.)
//  SET DOIT='TRUE'  /* 'FALSE' to skip STEP.  */
//*
//L  IF ( &DOIT ) THEN  /* Unsupported, but no warning issued.  */
//STEP  EXEC PGM=IEHINITT ...  /* My favorite conditional step.  */
//L2  ENDIF

The JCL Ref states that construct does not produce predictable results
(again, from fading memory).  The spec should be tightened.  The
behavior on the first step should be made consistent, and the JCL Ref
should be updated to describe the current useful behavior of IF for
other steps.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to