Character sets
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.
Character set | Contents | Details |
---|---|---|
Alphanumeric |
Alphabetic |
Capital A through Z |
National |
“At” sign |
@ (Characters that can be |
Special | Comma |
, |
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'.
|
Character | 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.
//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.
Statement 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 |
EXEC ACCT | Hyphens (-) or plus zero (+0, an overpunch) | //S1 EXEC PGM=A,ACCT=D58-LOC |
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 |
|
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) |
|
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 |