- Expressions
- Operator commands
- Messages
- Rule records
- SMF records
&) character; the only exception is an
expression. When symbolic fields are used in the rules language, the entire symbolic name need not be entered, only enough of the name to ensure that the field is unique.
For example, a symbolic name of &JOBN can be used
to specify &JOBNAME.
Only symbolic fields can be used on the left side of an expression.
Therefore, the ampersand (&) is optional in some
contexts. For example, both of the following expressions compare the
user's account number to the literal "SY-0286-DJT":
IF &ACCT = SY-0286-DJT
IF ACCT = SY-0286-DJT
When evaluating an expression, symbolic substitution is performed before expression evaluation. This allows symbolic fields on both sides of a relational operator. For example:
IF &OWNER NE &JOBNAME
The DEFCMD, DEFMSG,
DEFREC, and DEFSMF statements can
use symbolic fields to build operator commands, messages, rule records,
and SMF records.
For example, the following message will perform symbolic substitution for the current job name:
DEFMSG WRNMSG01 "** WARNING ** &JOBNAME INVALID"
When only part of a symbolic field is required, specify the displacement and length of the substring in parentheses, separated by a comma or blank. The parenthetical specification must be concatenated with the symbolic field name with no intervening blanks. For example, to evaluate the first three characters of the job name:
&JOBNAME(1,3)
The above examples also apply when symbolic fields reference dataset attributes (for example, VSAM owner identifiers) or other metadata: symbolic substitution always occurs first, then the resulting values are used in expression evaluation or message construction.