On Fri, 16 Aug 2024 13:10:28 -0500, Steve Estle \ wrote: >Thanks to responses. > >Follow-on question - I have looked through JCL Ref Guide & Init & Tuning Guide >and can't seem to find what I am looking for. I am looking for exhaustive >built-in symbols list (such as &SYSUID) that can be used in batch jobs. I'm >not talking about the system symbols (such &SMFID) which are defined in >SYS1.PARMLIB. To be more specific, I was hoping there was a built-in symbol >to capture the current jobname such as &JOBNAME, but when I used that in test >job it got substituted with "JES2" in converted JCL. Is there some >exhaustive list of these "Job specific" built in symbols documented someplace >as I don't see in JCL reference guide. > >How can I derive current jobname (or stepname, etc) to use in my JCL stream? > Inexplicably, neither the name coded on the JOB statement nor the ID assigned by JES appears in the list: <https://www.ibm.com/docs/en/zos/3.1.0?topic=variables-overview-using-control>
(Inexplicably, the ID assigned by JES3 changes from reader to convrerter to interpreter, making it hard to track a job through the system. JES3 partisans believe this is normal.) Inexplicably, JCL allows neither a SET statement to appear before the JOB statement nor a symbol to appear in the name field of the JOB statement, which might satisfy your need. Once, in REXX, I used non interactive ISPF to extract a job ID. Prior to the availability of SET, I kept some JCL in here-documents in shell scripts where symbol handling is better. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN