In a recent note, Howard Brazee said:

> Date:         Fri, 16 Sep 2005 07:36:05 -0600
> 
> It's what I expected.   Just as JCL does a syntax check before starting
> the job, it does a similar check before starting a step.   When it
> checks and find it can't run, it fails.
> 
"similar" conceals a lot of details.  Can it check everything
before it does anything?  Creating a data set requires updating
a VTOC, which requires an exclusive ENQ.  Can it ENQ on all the
VTOCs in one macro; attempt updating them, then if any one
fails, undo the ones it had done to that point, and DEQ?

I did some more experimenting.  With the JCL:

    //STEP     EXEC  PGM=IEFBR14
    //*
    //DD1       DD   DISP=(NEW,CATLG),UNIT=SYSALLDA,SPACE=(TRK,0),
    //  DSN=&SYSUID..TEST.BAD.DUPE
    //*
    //DD2       DD   DISP=(NEW,CATLG),UNIT=SYSALLDA,SPACE=(CYL,65000),
    //  DSN=SYS1.&SYSUID..TEST.BAD.DUPE
    //*
    //DD3       DD   DISP=SHR,UNIT=SYSALLDA,  VOL=SER=&VOL,
    //  DSN=&SYSUID..NO.SUCH.DATA.SET

I get:

    IEF212I BADDUP STEP DD3 - DATA SET NOT FOUND
    IEF272I BADDUP STEP - STEP WAS NOT EXECUTED.

However, if I uncomment the "VOL=SER=&VOL" on DD3, I get:

    IEF344I BADDUP STEP DD2 - ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM ERRO
    IGD17012I USER NOT AUTHORIZED TO DEFINE DATA SET
        ...
    DADSM HISTORIC RETURN CODE IS 172 DADSM DIAGNOSTIC INFORMATION IS 040E0800
    IEF272I BADDUP STEP - STEP WAS NOT EXECUTED.
    IEF285I   USER.NO.SUCH.DATA.SET                        KEPT
    IEF285I   VOL SER NOS= .......
    IEF285I   USER.TEST.BAD.DUPE                           DELETED

So, I conclude that the initiator first attempts catalog lookups
for those data sets for which either unit or volser information
is absent and those for which the status does not allow creation.
If any catalog lookup fails, no allocation occurs, and the job
fails with JCL ERROR (worse than ABEND).

If all required catalog lookups succeed, the initiator allocates
data sets in the order of the DD statements.  If any allocation
fails, new data sets allocated to that point are deleted.  This
sequential allocation fits my experience of being able to refer
back to a newly created data set in the same step.

The "IEF285I  USER.NO.SUCH.DATA.SET  KEPT" is a shameless lie:
the data set was never created; doesn't exist; "KEPT" can't be.
I suspect M&C may say what "KEPT" really means; I don't respect
that; mere existence of a M&C manual should justify only
abbreviation of information in the message; not outright
falsehood.

But, I shouldn't need to discover such facts empirically.  My
original question, "Where is all this documented?" still stands.

-- gil
-- 
StorageTek
INFORMATION made POWERFUL

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

Reply via email to