HLASM Language Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Integer attribute (I')

HLASM Language Reference
SC26-4940-06

The integer attribute has a numeric value that depends on the length and scale attribute values of the data being referred to by the attribute reference. The formulas relating the integer attribute to the length and scale attributes are given in Table 1.

The integer attribute can also be specified outside conditional assembly instructions. Then, the integer attribute value is not used for conditional assembly processing, but is used as a value at assembly time.
Notes:
  1. The integer attribute reference can be used only in arithmetic expressions.
  2. When no integer attribute value can be determined, the reference is flagged and the integer attribute is 1.
  3. If the value of the SETC symbol is equal to the name of an instruction that can validly define the integer attribute, the assembler lets you use the integer attribute with a SETC symbol.
  4. Binary floating-point constants return an attribute of 0.
  5. Decimal floating-point constants return an attribute of 0.
  6. The integer attribute reference can only be used in arithmetic expressions in conditional assembly instructions, and in absolute and relocatable expressions in assembler and machine instructions.
Table 1. Relationship of integer to length and scale attributes
Constant Type Formula Relating Integer to Length and Scale Attributes Examples Values of the Integer Attribute
Fixed-point(H and F) I' = 8*L'-S'-1
HALFCON DC HS6'-25.93'
 
 
ONECON  DC FS8'100.3E-2'
I' = 8*2-6-1
   = 9
 
I' = 8*4-8-1
   = 23

Floating-point
(D, E, and L)
 
 
 
 
 
L-type only

when L' ≤ 8
I' = 2*(L'-1)-S'
 
 
 
 
 
when L' > 8
I' = 2*(L'-1)-S'-2
 
SHORT   DC ES2'46.415'
 
 
LONG    DC DS5'-3.729'
 
 
 
EXTEND  DC LS10'5.312'
 
I' = 2*(4-1)-2
   = 4
 
I' = 2*(8-1)-5
   = 9
 
 
I' = 2*(16-1)-10-2
   = 18

Decimal¹
Packed (P)
 
 
Zoned (Z)

 
I' = 2*L'-S'-1
 
 
I' = L'-S'
 
PACK    DC P'+3.513'
 
 
ZONE    DC Z'3.513'
 
I' = 2*3-3-1
   = 2
 
I' = 4-3
   = 1
Note:
  1. The value of the integer attribute is equal to the number of digits to the left of the assumed decimal point after the constant is assembled, and the value of the scale attribute is equal to the number of digits to the right of the assumed decimal point.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014