Chapter Contents

Previous

Next
ZDw.d

ZDw.d



Reads zoned decimal data

Numeric
Width range: 1-32 bytes
Decimal range: 0-32
OS/390 specifics: IBM zoned decimal format


Details
See Also


Details

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.

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

Data Line (Hex) Informat Value
F0F0F0F1F2F3F0C0 zd8.2 123
F0F0F0F0F0F1F2D3 zd8. -123
F0F0F0F0F1F2F3C0 zd8.6 0.00123
F0F0F0F0F0F0F0C1 zd8.6 1E-6

Note:   In these examples, Data Line (Hex) 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


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.