Reads and validates zoned decimal data
-
w
-
specifies the width of the input field.
-
d
-
optionally specifies the power of 10 by
which to divide the value.
The ZDVw.d informat reads data in which every digit requires one byte
and in which the last byte contains the value's sign along with the last digit.
It also validates the input string and disallows invalid data.
ZDVw.d
is dependent on the operating environment. For example, on IBM mainframes,
ZDVw.d requires
an F for all high-order nibbles except the last. (In contrast, the ZDw.d informat ignores the high-order
nibbles for all bytes except those that are associated with the sign.) The
last high-order nibble accepts values ranging from A-F, where A, C, E, and
F are positive values and B and D are negative values. The low-order nibble
on IBM mainframes must be a numeric digit that ranges from 0-9, as with ZD.
Note:
Different operating environments store zoned decimal
values in different ways. However, the ZDVw.d informat reads zoned decimal values with consistent results
if the values are created in the same type of operating environment that you
use to run SAS.
The
ZDVw.d
informat functions like the ZDw.d informat with one exception: ZDVw.d validates the
input string and disallows invalid data.
input @1 test zdv4.;
|
Data Lines* |
Results |
----+----1
|
|
F0F1F2C8
|
128
|
| *The data line contains a hexadecimal representation
of a binary number stored in zoned decimal form. The example was run on an
IBM mainframe. The results may vary depending on your operating environment. |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.