Here is what the JCL manual  z/OS MVS JCL Reference SA23-1385-00 Location in 
the JCL states:

A SET statement can appear anywhere in the job after the JOB statement with the 
following restrictions:

    It must appear in the job's JCL before the intended use of the symbolic 
parameter.
    It must follow a complete JCL statement.
    It cannot appear immediately after the first DD statement within a 
concatenation.

    Examples: The following JCL will work.

        //DD1       DD  DSN=dsnA,DISP=SHR
        //          DD  DSN=dsnB,DISP=SHR
        //         SET  
        //          DD  DSN=dsnC,DISP=SHR

    The following JCL will fail.

        //DD1       DD  DSN=dsnA,DISP=SHR
        //         SET  
        //          DD  DSN=dsnB,DISP=SHR
        //          DD  DSN=dsnC,DISP=SHR


The way I read it, the FIRST DD statement in a concatenation cannot have a SET 
following.  But the next one can.

So in your JCL you seem to have a concatenation of 
           //DD2    DD   *
           //       DD   PATH='/dev/./null'

According to the text above, you would have to put the SET after the DD PATH or 
before the DD * but not immediately after the DD * statement. 

I would expect this to work: 
 
           //     SET
           //DD2    DD   *
           //       DD   PATH='/dev/./null'

I would also expect this to work: 
 
           //DD2    DD   *
           //       DD   PATH='/dev/./null'
           //     SET                     
           //       DD   DISP=SHR,...

I would NOT expect this to work: 
 
           //DD2    DD   *
           //     SET
           //       DD   PATH='/dev/./null'

Though I could be wrong.  Sometimes IBM documentation is misleading.  To me the 
behavior is along the lines of this documentation.  To verify, you could change 
the DD * to a dataset and see if it still fails.



Lizette


> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
> Behalf Of Paul Gilmartin
> Sent: Tuesday, December 22, 2015 8:41 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Where is SET allowed in JCL?
> 
> Sometimes within a DD concatenation; sometimes not.  For example:
> 
>         3 //STEP  EXEC  PGM=IEFBR14
>           //*
>         4 //DD1    DD   *
>         5 //       DD   PATH='/dev/./null'
>         6 //  SET V1=WOMBAT
>         7 //       DD   PATH='/dev/./null'
>           //*
>         8 //DD2    DD   *
>         9 //  SET V2=WOMBAT
>        10 //       DD   PATH='/dev/./null'
>        11 //
>  STMT NO. MESSAGE
>        10 IEFC019I MISPLACED DD STATEMENT
> 
> Why does it report IEFC019I at statement 10, but not at statement 7?
> 
> I had grown accustomed to placing SET in complex concatenations, near a
> reference for clarity.  Today was the first time I tried it after DD *.
> 
> Should I submit an RCF requesting clarification or an SR for inconsistent
> behavior?
> 
> I hate JCL!
> 
> -- 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