Hi, There are two system symbols that are available (but not listed in the SYMBOLS table and not documented in the same place as the &JOBNAME symbol:
&SYSJOBNM. - Contains the current JOB Name &SYSJOBID. - Contains the current JOB ID (e.g. JOB19002) This has been in place since z/OS 2.3 (maybe earlier, but that's when I've been told after I created an RFE about this.) Roger W. Suhr [email protected] -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Gadi Ben-Avi Sent: Wednesday, December 29, 2021 09:03 To: [email protected] Subject: Using the JOBNAME system symbol in a batch job Hi, How do I use the JOBNAME system symbol in a batch job and have it resolve to the JOBNAME? Currently, every time I try, it resolved to JES2. We are running z/OS v2.4. Thanks Gadi ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
