The short answer, from the JCL Reference, says this:
You cannot use system symbolsexcept for &SYSUID, in batch JCL.
The other system symbols you see with the D SYMBOLS command, are not for batch
JCL, but only for TSO logon procs or started tasks.
--Roger
"Barkow, Eileen"
<[email protected].
GOV> To
Sent by: IBM [email protected]
Mainframe cc
Discussion List
<[email protected] Subject
du> Re: Using system variables in JCL
04/08/2009 11:10 AM
Please respond to
IBM Mainframe
Discussion List
<[email protected]
du>
look in the mvs jcl reference manual
.4 Using System Symbols and JCL Symbols
System symbols and JCL symbols are character strings that represent
variable information in JCL. They allow you to modify JCL statements in
a job easily. A symbol-defining string is limited to eight characters,
not including an identifying ampersand.
This section:
Describes system symbols and JCL symbols and the differences between
them
Explains how to define JCL symbols
Shows how to code system symbols and JCL symbols.
5.4.1 What are System Symbols?
5.4.2 What are JCL Symbols?
5.4.3 Coding Symbols in JCL
5.4.4 Determining Equivalent JCL
5.4.5 Examples of Defining and Coding Symbols in JCL
5.4.6 Using Symbols in Nested Procedures
5.4.7 Examples of Coding Symbols in Nested Procedures
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Johnson Jr., Donald E
Sent: Wednesday, April 08, 2009 12:38 PM
To: [email protected]
Subject: Using system variables in JCL
I have had someone ask me a question that I could not answer directly,
and hope someone can point me in the right direction.
How can I determine what system variables are available for use in JCL
DSN statements? For example, I know that I can use &SYSUID, but it seems
that other variables like &JOBNAME, &YYMMDD, &DATE are not valid.
Is there somewhere I can look to use these other variables, or to find
out what is available?
Thanks!
Don
Don Johnson
CA
Sr. Support Engineer
This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and contain information that may be privileged
and confidential. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient of
this e-mail, please delete this e-mail and any files transmitted with it
and notify the sender immediately.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
_____________________________________________________________________________
"This message and any attachments are solely for the intended recipient and may
contain confidential or privileged information. If you are not the intended
recipient, any disclosure, copying, use, or distribution of the information
included in this message and any attachments is prohibited. If you have
received this communication in error, please notify us by reply e-mail and
immediately and permanently delete this message and any attachments. Thank
you."
_____________________________________________________________________________
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html