Previous Page | Next Page

Informats under z/OS

ZDw.d Informat: z/OS

Reads zoned-decimal data.
Width range: 1-32 bytes
Decimal range: 0-32
z/OS specifics: IBM zoned decimal format
See: ZDw.d Informat in SAS Language Reference: Dictionary

See Also


Like numbers that are stored in standard format, zoned decimal digits are represented in EBCDIC code. Each digit requires one byte of storage space. The low-order, or rightmost, byte represents both the least significant digit and the sign of the number. Digits to the left of the least significant digit are represented in EBCDIC code as 'F0'x through 'F9'x. The character that is printed for the least significant digit depends on the sign of the number. In EBCDIC code, negative numbers are represented as 'D0'x through 'D9'x in the least significant digit position; positive numbers are represented as 'C0'x through 'C9'x. If the informat specification includes a d value, the number is divided by 10d.

The following examples illustrate the use of the ZDw.d informat:

Data Line (Hexadecimal) Informat Value Notes
F0F0F0F1F2F3F0C0 zd8.2 123 a d value of 2 causes the number to be divided by 102
F0F0F0F0F0F1F2D3 zd8. -123
F0F0F0F0F1F2F3C0 zd8.6 0.00123 a d value of 6 causes the number to be divided by 106
F0F0F0F0F0F0F0C1 zd8.6 1E-6 a d value of 6 causes the number to be divided by 106

Note:   In these examples, Data Line (Hexadecimal) represents the bit pattern stored, which is the value you see if you view it in a text editor that displays values in hexadecimal representation. Value is the number that is used by SAS after the data pattern has been read using the corresponding informat. See EBCDIC Code: Commonly Used Characters for a table of commonly used EBCDIC characters.  [cautionend]

See Also

Previous Page | Next Page | Top of Page