&JOBNAME Within JCL, the substitution text for &JOBNAME is the name of the job 
assigned to the address space in which the JCL is converted, not the name of 
the job being processed. For instance, if JES2 does the conversion, &JOBNAME 
resolves to JES2.

This works for me in 2.5

//         EXPORT SYMLIST=(SYSJOBNM,SYSJOBID,SYSUID)  
//         SET SYSJOBNM=&SYSJOBNM                     
//         SET SYSJOBID=&SYSJOBID                     
//         SET SYSUID=&SYSUID                         
//IEBGENER EXEC PGM=IEBGENER                          
//SYSUT1   DD *,SYMBOLS=JCLONLY                       
LASSE &YYMMDD &SYSUID &SYSJOBNM &SYSJOBID             
//SYSUT3   DD DISP=(NEW,CATLG,DELETE),                
//            LRECL=080,RECFM=FB,                     
//            SPACE=(TRK,(01,01),RLSE),               
//            DSN=&SYSUID..&SYSJOBNM..&SYSJOBID       

//Lasse

-----Ursprungligt meddelande-----
Från: IBM Mainframe Discussion List <[email protected]> För Sri Hari 
Kolusu
Skickat: den 18 augusti 2024 18:47
Till: [email protected]
Ämne: Re: Ability to pass symbolic variable back from REXX to JCL?

>> 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.

Steve, 

Check these out

https://www.ibm.com/docs/en/zos/2.5.0?topic=iazsymbl-jes-system-symbols

https://www.ibm.com/docs/en/zos/2.3.0?topic=symbols-dynamic-system


Thanks,

Kolusu

----------------------------------------------------------------------
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

Reply via email to