On Wed, 9 Jun 2010 18:07:40 +0200, Monika Amiss wrote:
>
> I'm running following job with z/OS 1.10 /JES3). Program MAKEABND
> (STEP04) produces an S0C1-Abend, and STEP06 is executed, which I
> did not expect. If I put the ENDIF before STEP06, STEP06 is Flushed
> (like expected),
>
>//STEP01  EXEC PGM=IEFBR14
>//*
>// IF ABEND THEN
>//STEP02 EXEC PGM=IEFBR14
>// ELSE
>//STEP03 EXEC PGM=IEFBR14
>//*
>//STEP04  EXEC PGM=MAKEABND,COND=(0,NE,STEP03)
>//*
>//STEP05  EXEC PGM=IEFBR14,COND=(EVEN)
>//*
>//STEP06  EXEC PGM=IEFBR14
>//  ENDIF
>
>Does somebody has an explanation fot this behaviour. Any hint
>appreciated.
>
This seems to considerably violate:

17.1.9 "z/OS V1R10.0 MVS JCL Reference"
     * The result of processing an IF/THEN/ELSE/ENDIF statement construct, once
       determined, remains unchanged regardless of the outcome from running any 
remaining
       steps in a job. The system does not reexamine the original condition at 
any later
       job step termination, either normal or abnormal.

... but, e.g., read carefully:

     * 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.

That latter bullet is new.  There was formerly a statement that IF
could appear only after the first EXEC statement.  Apparently someone
complained and they changed the doc.

It appears as if "IF ABEND" operates by adding an implicit COND
to every step in the ELSE group.

You can try a PMR.  I wouldn't expect anything more than a DOC closure.

It's an intractable, fragile kludge.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to