SET symbol specifications
SET symbols can be used in model statements, from which assembler
language statements are generated, and in conditional assembly
instructions. The three types of SET symbols are: SETA, SETB, and
SETC.
A SET symbol must be a valid variable symbol.
The rules for creating a SET symbol are:
- The first character must be an ampersand (&)
- The second character must be an alphabetic character
- The remaining characters must be 0 to 61 alphanumeric
- The first four characters should not be &SYS, which are used for
system variable symbols
Examples:
&ARITHMETICVALUE439
&BOOLEAN
&C
&EASY_TO_READ
Local SET symbols need not be declared by explicit declarations. The
assembler considers any undeclared variable symbol found in the name
field of a SETx instruction as a local SET
symbol, and implicitly declares it to have the type
specified by the SETx instruction.
The instruction that
declares a SET symbol determines its scope and type.
The features of SET symbols and other types of variable symbols are
compared in Table 50.
Table 50. Features of SET symbols and other types of variable symbols
Features |
SETA, SETB,
SETC symbols |
Symbolic
Parameters |
System Variable
Symbols |
|
Can be used in:
Open code
Macro definitions
|
Yes
Yes
|
No
Yes
|
&SYSASM
&SYSDATC
&SYSDATE
&SYSJOB
&SYSM_HSEV
&SYSM_SEV
&SYSOPT_DBCS
&SYSOPT_OPTABLE
&SYSOPT_RENT
&SYSOPT_XOBJECT
&SYSPARM
&SYSSTEP
&SYSSTMT
&SYSTEM_ID
&SYSTIME
&SYSVER
All
|
|
Scope:
Local
Global
|
Yes
Yes
|
Yes
No
|
&SYSADATA_DSN
&SYSADATA_MEMBER
&SYSADATA_VOLUME
&SYSCLOCK
&SYSECT
&SYSIN_DSN
&SYSIN_MEMBER
&SYSIN_VOLUME
&SYSLIB_DSN
&SYSLIB_MEMBER
&SYSLIB_VOLUME
&SYSLIN_DSN
&SYSLIN_MEMBER
&SYSLIN_VOLUME
&SYSLIST
&SYSLOC
&SYSMAC
&SYSNDX
&SYSNEST
&SYSPRINT_DSN
&SYSPRINT_MEMBER
&SYSPRINT_VOLUME
&SYSPUNCH_DSN
&SYSPUNCH_MEMBER
&SYSPUNCH_VOLUME
&SYSSEQF
&SYSTERM_DSN
&SYSTERM_MEMBER
&SYSTERM_VOLUME
&SYSASM
&SYSDATC
&SYSDATE
&SYSJOB
&SYSM_HSEV
&SYSM_SEV
&SYSOPT_DBCS
&SYSOPT_OPTABLE
&SYSOPT_RENT
&SYSOPT_XOBJECT
&SYSPARM
&SYSSTEP
&SYSSTMT
&SYSTEM_ID
&SYSTIME
&SYSVER
|
|
Values can be
changed within
scope of symbol
|
Yes1 |
No, read only
value2
|
No, read only
value2
|
|
Notes:
- The value assigned to a SET symbol can be changed by using the
SETA, SETAF, SETB, SETC, or SETCF
instruction within the declared
or implied
scope of the SET symbol.
- A symbolic parameter and the system variable symbols (except for
&SYSSTMT,
&SYSM_HSEV, and &SYSM_SEV)
are assigned values that remain fixed throughout their scope.
Wherever a SET symbol appears in a statement, the assembler replaces the
symbol's current value with the value assigned to it.
|
SET symbols can be used in the name,
operation, and operand fields of macro
instructions. The value thus passed through the name field symbolic
parameter into a macro definition is considered as a character string and
is generated as such. If the COMPAT(SYSLIST) assembler option is
specified, the value passed through an operand field symbolic into a
macro definition is also considered a character string and is
generated as such. However, if the COMPAT(SYSLIST) assembler option is
not specified, SET symbols can be used to pass sublists into a macro
definition.
[ Top of Page | Previous Page | Next Page | Contents | Index ]