Data attributes
The data, such as instructions, constants, and areas, that you
define in a source module, can be described by its:
- Type, which distinguishes
a property of a named object or macro argument,
for example,
fixed-point constants from floating-point constants, or machine
instructions from macro instructions
- Length, which gives the number of bytes occupied by the object code
of the
named
data
- Scaling, which shows the number of positions occupied by the
fractional portion of
named
fixed-point, floating-point, and decimal
constants in their object code form
- Integer, which shows the number of positions occupied by the
integer portion of
named
fixed-point and decimal constants in their object code
form
- Count, which gives the number of characters that would be required to
represent the
named
data, such as a macro instruction operand, as a character
string
- Number, which gives the number of sublist entries in a macro
instruction operand
- Defined, which determines whether a symbol has been defined prior to
the point where the attribute reference is coded
- Operation Code, which shows if an operation code, such as a
macro definition or machine instruction, is defined prior to the
point where the attribute reference is coded
These characteristics are called the attributes of the
symbols naming the
data. The assembler assigns attribute values to the ordinary symbols
and variable symbols that represent the data.
Specifying attributes in conditional assembly instructions allows you
to control conditional assembly logic, which, in turn, can control the
sequence and contents of the statements generated from model statements.
The specific purpose for which you use an attribute depends on the kind
of attribute being considered. The attributes and their main uses are
shown below:
Table 51. Data attributes
| Attribute |
Purpose |
Main Uses |
| Type |
Gives a letter that identifies type of data represented |
- In tests to distinguish between different data types
- For value substitution
- In macros to discover missing operands
|
| Length |
Gives number of bytes that data occupies in storage |
- For substitution into length fields
- For computation of storage requirements
|
| Scaling |
Refers to the position of the decimal point in
fixed-point, floating-point and decimal constants |
- For testing and regulating the position of decimal points
- For substitution into a scale modifier
|
| Integer |
Is a function of the length and scale attributes of decimal,
fixed-point, and floating-point constants |
- To keep track of significant digits (integers)
|
| Count |
Gives the number of characters required to represent data |
- For scanning and decomposing character strings
- As indexes in substring notation
|
| Number1 |
Gives the number of sublist entries in a macro instruction
operand sublist,
or the maximum subscript of a dimensioned SET symbol
to which a value has been assigned. |
- For scanning sublists
- As a counter to test for end of sublist
- For testing array limits
|
| Defined |
Shows whether the symbol referenced has been defined
prior to the attribute reference |
- To avoid defining a symbol again if the
symbol referenced has been previously defined
|
| Operation Code |
Shows whether a given operation code has been defined
prior to the attribute reference |
- To avoid assembling a
macro or
instruction if it does not exist.
|
|
Notes:
- The number attribute of &SYSLIST(n) and
&SYSLIST(n,m) is described in &SYSLIST System Variable Symbol.
|
| Attribute reference |
 >>-attribute_notation'-+-ordinary_symbol--+--------------------><
+-variable_symbol--+
+-literal----------+
'-character_string-'
|
- attribute_notation'
- is the attribute whose value you want, followed by a
single quotation mark.
Valid attribute letters are "D",
"O", "N", "S", "K", "I", "L",
and "T".
- ordinary_symbol
- is an ordinary symbol that represents the data that
possesses the attribute.
An ordinary symbol cannot be specified with the operation code
attribute.
- variable_symbol
- is a variable symbol that represents the data that
possesses the attribute.
- literal
- is a literal that represents the data that possesses the attribute.
A literal cannot be specified with the operation code attribute
or count attribute.
- character_string
- is a character string that represents the operation code
in the operation code attribute.
Examples:
T'SYMBOL
L'&VAR
K'&PARAM
O'MVC
S'=P'975.32'
The assembler substitutes the value of the attribute for the
attribute reference.
Reference to the count (K'), defined (D'), number
(N'), operation code (O'),
and type (T') attributes can be used only
in conditional assembly instructions or
within macro definitions.
The length (L'), integer
(I'), and scale (S')
attribute references can be in
conditional assembly instructions, machine instructions, assembler
instructions, and the operands of macro instructions.
[ Top of Page | Previous Page | Next Page | Contents | Index ]