Data attributes
- 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 are 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. Here are the attributes and their main uses:
| Attribute | Purpose | Main Uses |
|---|---|---|
| Type | Gives a letter that identifies type of data represented |
|
| Length | Gives number of bytes that data occupies in storage |
|
| Scaling | Refers to the position of the decimal point in fixed-point, floating-point, and decimal constants |
|
| Integer | Is a function of the length and scale attributes of decimal, fixed-point, and floating-point constants |
|
| Count | Gives the number of characters required to represent data |
|
| Number¹ | 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. |
|
| Defined | Shows whether the symbol referenced has been defined prior to the attribute reference |
|
| Operation Code | Shows whether a given operation code has been defined prior to the attribute reference |
|
| Notes:
|
||
- attribute_notation'
- Is
the attribute whose value you want, followed by a apostrophe. Valid
attribute letters are
D
,O
,N
,S
,K
,I
,L
, andT
. - 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.
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') and number (N') attributes can be used only in conditional assembly instructions or within macro definitions. The length (L'), integer (I'), operation code (O'), type (T') and scale (S') attribute references can be in conditional assembly instructions, machine instructions, assembler instructions, and the operands of macro instructions.
