HLASM Language Reference
HLASM Language Reference HLASM Language Reference
Data Attributes this example indicates, created SET symbols may be declared and used as arrays of dimensioned variables. Created SET symbols also enable you to achieve some of the effect of multiple-dimensioned arrays by creating a separate name for each element of the array. For example, a 3-dimensional array of the form &X(&I,&J,&K) could be addressed as &(X&I.$&J.$&K), where &I, &J, and &K would typically have numeric values. Thus, &X(2,3,4) would be represented by &X2$3$4. The $ separators guarantee that &X(2,33,55) and &X(23,35,5) are unique: &X(2,33,55) becomes &X2$33$55 &X(23,35,5) becomes &X23$35$5 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: 324 HLASM V1R5 Language Reference
Data Attributes Figure 87. Data Attributes Attribute Purpose Main Uses Type Length Scaling Integer Count Number Defined Operation Code Gives a letter that identifies type of data represented Gives number of bytes that data occupies in storage Refers to the position of the decimal point in fixed-point, floating-point and decimal constants Is a function of the length and scale attributes of decimal, fixed-point, and floating-point constants Gives the number of characters required to represent data 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. Shows whether the symbol referenced has been defined prior to the attribute reference Shows whether a given operation code has been defined prior to the attribute reference In tests to distinguish between different data types For value substitution In macros to discover missing operands For substitution into length fields For computation of storage requirements For testing and regulating the position of decimal points For substitution into a scale modifier To keep track of significant digits (integers) For scanning and decomposing character strings As indexes in substring notation For scanning sublists As a counter to test for end of sublist For testing array limits To avoid defining a symbol again if the symbol referenced has been previously defined To avoid assembling a macro or instruction if it does not exist. Notes: 1. The number attribute of &SYSLIST(n) and &SYSLIST(n,m) is described in “&SYSLIST System Variable Symbol” on page 276. 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. Chapter 9. How to Write Conditional Assembly Instructions 325
- Page 294 and 295: &SYSLIN_DSN System Variable Symbol
- Page 296 and 297: &SYSLIST System Variable Symbol The
- Page 298 and 299: &SYSLOC System Variable Symbol To
- Page 300 and 301: &SYSM_SEV System Variable Symbol &S
- Page 302 and 303: &SYSNDX System Variable Symbol The
- Page 304 and 305: &SYSOPT_DBCS System Variable Symbol
- Page 306 and 307: &SYSPARM System Variable Symbol Not
- Page 308 and 309: &SYSPRINT_MEMBER System Variable Sy
- Page 310 and 311: &SYSPUNCH_MEMBER System Variable Sy
- Page 312 and 313: &SYSSTEP System Variable Symbol Not
- Page 314 and 315: &SYSTERM_DSN System Variable Symbol
- Page 316 and 317: &SYSTIME System Variable Symbol Not
- Page 318 and 319: Macro Instruction Format sequence_s
- Page 320 and 321: Macro Instruction Format Operand En
- Page 322 and 323: Macro Instruction Format When you n
- Page 324 and 325: Sublists in Operands the order in w
- Page 326 and 327: Sublists in Operands &SYSLIST( n,m)
- Page 328 and 329: Values in Operands Notes: 1. Spaces
- Page 330 and 331: Values in Operands Parentheses In m
- Page 332 and 333: Inner and Outer Macro Instructions
- Page 334 and 335: Levels of Macro Call Nesting When t
- Page 336 and 337: Levels of Macro Call Nesting System
- Page 338 and 339: How to Write Conditional Assembly I
- Page 340 and 341: SET Symbols SET Symbol Specificatio
- Page 342 and 343: SET Symbols Figure 86 (Page 3 of 3)
- Page 346 and 347: Data Attributes variable_symbol is
- Page 348 and 349: Data Attributes The value of an att
- Page 350 and 351: Data Attributes The following attri
- Page 352 and 353: Data Attributes Assembler gives a t
- Page 354 and 355: Data Attributes The scale attribute
- Page 356 and 357: Data Attributes Number Attribute (N
- Page 358 and 359: Data Attributes The operation code
- Page 360 and 361: Lookahead MACRO &NAME MOVE &TO,&FRO
- Page 362 and 363: Open Code Sequence Symbols The cond
- Page 364 and 365: GBLA, GBLB, and GBLC Instructions G
- Page 366 and 367: LCLA, LCLB, and LCLC Instructions s
- Page 368 and 369: SETA Instruction expression is an a
- Page 370 and 371: SETA Instruction | The logical-exp
- Page 372 and 373: SETA Instruction | Figure 99 (Page
- Page 374 and 375: SETA Instruction | The result of C2
- Page 376 and 377: SETA Instruction NOT Format: Logica
- Page 378 and 379: SETA Instruction | X2A Name Operati
- Page 380 and 381: SETA Instruction In evaluating the
- Page 382 and 383: SETB Instruction Any expression tha
- Page 384 and 385: SETB Instruction ┌─────
- Page 386 and 387: SETB Instruction | ISDEC | Format:
- Page 388 and 389: SETB Instruction The two comparands
- Page 390 and 391: SETC Instruction Notes: 1. The asse
- Page 392 and 393: Figure 103. Substring Notation in C
Data Attributes<br />
this example indicates, created SET symbols may be declared and used as arrays<br />
of dimensioned variables.<br />
Created SET symbols also enable you to achieve some of the effect of<br />
multiple-dimensioned arrays by creating a separate name for each element of the<br />
array. For example, a 3-dimensional array of the form &X(&I,&J,&K) could be<br />
addressed as &(X&I.$&J.$&K), where &I, &J, and &K would typically have numeric<br />
values. Thus, &X(2,3,4) would be represented by &X2$3$4. The $ separators<br />
guarantee that &X(2,33,55) and &X(23,35,5) are unique:<br />
&X(2,33,55) becomes &X2$33$55<br />
&X(23,35,5) becomes &X23$35$5<br />
Data Attributes<br />
The data, such as instructions, constants, and areas, that you define in a source<br />
module, can be described by its:<br />
Type, which distinguishes a property of a named object or macro argument, for<br />
example, fixed-point constants from floating-point constants, or machine<br />
instructions from macro instructions<br />
Length, which gives the number of bytes occupied by the object code of the<br />
named data<br />
Scaling, which shows the number of positions occupied by the fractional portion<br />
of named fixed-point, floating-point, and decimal constants in their object code<br />
form<br />
Integer, which shows the number of positions occupied by the integer portion of<br />
named fixed-point and decimal constants in their object code form<br />
Count, which gives the number of characters that would be required to<br />
represent the named data, such as a macro instruction operand, as a character<br />
string<br />
Number, which gives the number of sublist entries in a macro instruction<br />
operand<br />
Defined, which determines whether a symbol has been defined prior to the<br />
point where the attribute reference is coded<br />
Operation Code, which shows if an operation code, such as a macro definition<br />
or machine instruction, is defined prior to the point where the attribute reference<br />
is coded<br />
These characteristics are called the attributes of the symbols naming the data. The<br />
assembler assigns attribute values to the ordinary symbols and variable symbols<br />
that represent the data.<br />
Specifying attributes in conditional assembly instructions allows you to control<br />
conditional assembly logic, which, in turn, can control the sequence and contents of<br />
the statements generated from model statements. The specific purpose for which<br />
you use an attribute depends on the kind of attribute being considered. The<br />
attributes and their main uses are shown below:<br />
324 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>