To code job control statements, use characters from the character
sets in Table 1. Table 2 lists the special characters that have syntactical functions
in job control statements.
Table 1. Character SetsCharacter set |
Contents |
Details |
---|
Alphanumeric
|
Alphabetic
Numeric
|
Capital A through Z
0 through 9
|
|
“At” sign
Dollar sign
Pound sign
|
@ (Characters that can be
$ represented by hexadecimal
# values X'7C', X'5B', and X'7B')
|
Special |
Comma
Period
Slash
Apostrophe
Left parenthesis
Right parenthesis
Asterisk
Ampersand
Plus sign
Hyphen
Equal sign
Blank
|
,
.
/
'
(
)
*
&
+
-
=
|
EBCDIC text |
EBCDIC printable character set |
Characters that can be represented by hexadecimal X'40' through X'FE' |
Note: The system recognizes the
following hexadecimal representations of the U.S. National characters;
@ as X'7C'; $ as X'5B'; and # as X'7B'.
In countries other than the U.S., the U.S. National characters represented
on terminal keyboards might generate a different hexadecimal representation
and cause an error. For example, in some countries the $ character
may generate a X'4A'.
|
Table 2. Special Characters
Used in SyntaxCharacter |
Syntactical function |
---|
, |
To separate parameters and subparameters |
= |
To separate a keyword from its value, for example, BURST=YES |
( ␢ ) |
To enclose subparameter list or the member name of a PDS or
PDSE |
& |
To identify a symbolic parameter, for example, &LIB |
&& |
To identify a temporary data set name, for example, &&TEMPDS,
and, to identify an in-stream or sysout data set name, for example,
&&PAYOUT |
. |
To separate parts of a qualified data set name, for example,
A.B.C., or parts of certain parameters or subparameters, for example,
nodename.userid |
* |
To refer to an earlier statement, for example, OUTPUT=*.name,
or, in certain statements, to indicate special functions: //label
CNTL * //ddname DD * RESTART=* on the JOB statement |
' |
To enclose specified parameter values which contain special
characters |
(blank) |
To delimit fields |
Special characters in parameters: The syntax or parameter description indicates if the
variable that you code can contain special characters or not. Parameters
and subparameters that can contain special characters not used for
syntactical functions usually must be enclosed in apostrophes, for
example, ACCT='123+456'. Code each apostrophe that is part of the
parameter or subparameter as two consecutive apostrophes, for example,
code O'NEIL as 'O''NEIL'.
Table 3 lists the parameters that can
contain certain special characters without requiring enclosing apostrophes.
Ampersands are used in JCL to indicate the beginning of a symbolic
parameter (see
Using system symbols and JCL symbols). If a parameter
contains an ampersand and you do not want the system to interpret
the ampersand as a symbolic parameter, code the ampersand as two consecutive
ampersands. For example, code
//S1 EXEC PGM=IEFBR14,ACCT='&&ABC'
//DD1 DD DSN=&&TEST,UNIT=SYSDA,SPACE=(TRK,(1,1))
The system treats double ampersands as a single character. IBM
recommends that you use apostrophes to enclose parameters that contain
ampersands (other than a DSNAME parameter representing a temporary
data set) to further reduce the possibility of error.
Table 3. Special Characters
that Do Not Require Enclosing ApostrophesStatement and parameter or subparameter |
Special characters not needing enclosing apostrophes |
Examples |
---|
JOB accounting information |
Hyphens (-) |
//JOBA JOB D58-D04 |
JOB programmer's-name |
Hyphens (-), leading periods, or embedded periods. Note that
a trailing period requires enclosing apostrophes. |
//JOBB JOB ,S-M-TU
//JOBC JOB ,.ABC
//JOBD JOB ,P.F.M
//JOBE JOB ,'A.B.C.'
|
EXEC ACCT |
Hyphens (-) or plus zero (+0, an overpunch) |
//S1 EXEC PGM=A,ACCT=D58-LOC
//S2 EXEC PGM=B,ACCT=D04+0
|
DD DSNAME |
Hyphens (-) |
DSNAME=A-B-C |
|
Periods to indicate a qualified data set name |
DSNAME=A.B.C |
|
Double ampersands to identify a temporary data set name, and
to identify an in-stream or sysout data set name |
DSNAME=&&TEMPDS
DSNAME=&&PAYOUT
|
|
Parentheses to enclose the member name of
a partitioned data set (PDS) or partitioned data set extended (PDSE)
or the generation number of a generation data set
|
DSNAME=PDS1(MEMA)
DSNAME=ISDS(PRIME)
DSNAME=GDS(+1)
|
|
Plus (+) or minus (-) sign to identify a generation of a generation
data group |
DSNAME=GDS(-2) |
DD VOLUME=SER |
Hyphens (-) |
VOLUME=SER=PUB-RD |
DD UNIT device-type |
Hyphens (-) |
UNIT=SYSDA |