General Discussion & Announcements

 View Only
  • 1.  Availability of z/OS system symbols in JCL

    Posted 02-11-2018 15:34

    When I try to use system symbols &LYYMMDD and &LHHMMSS as part of a data set name in a standard JCL stream, z/OS appears not to recognize them. For example, when I submit this job …

    //IEFBR14  JOB ,,CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID     
    //*                                                    
    //IEFBR14  EXEC PGM=IEFBR14                            
    //*                                                    
    //FILE     DD DSN=TSTJV.D&LYYMMDD..T&LHHMMSS,          
    //            UNIT=3390,SPACE=(CYL,(1,1)),             
    //            DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=27920,
    //            DISP=(NEW,CATLG,DELETE)                  
    

    … I get this message:

    IEFC627I INCORRECT USE OF AMPERSAND IN THE DSN FIELD
    

    The message description is unenlightening. I haven’t found anything in the documentation that says I need to do something special to make the symbols available. I see the symbols in a few places in ROCKET.USER.PROCLIB, but if I invoke my JCL as a proc, I get the same error.

    Any ideas about what might be going on?



  • 2.  RE: Availability of z/OS system symbols in JCL

    Posted 02-12-2018 00:14

    IBM manual says…

    The following rules govern the use of system symbols:

    • To use system symbols in batch JCL, you must first specify SYSSYM=ALLOW on the class definition, and assign the batch job to that class.
    • You can use system symbols in started task JCL and batch job JCL (for both jobs and procedures), and in TSO logon procedures.
    • Within started task JCL and batch job JCL, you can use system symbols wherever you use JCL symbols (described under What are JCL symbols?).

    Have a look at item 1

    Regards,
    Gary