Reads packed decimal data
| Category |
numeric
|
| Width range: |
1-16
|
| Default width: |
1
|
| Decimal range: |
0-31
|
| OS/2 specifics: |
How values are interpreted as negative or
positive
|
-
w
-
specifies the width of the input field.
-
d
-
optionally specifies the power of 10 by which to divide the input value. If the data contain decimal points, then SAS ignores the d
value.
In packed decimal data, each byte contains two digits. The value's sign is in the first bit of the first byte (although the
entire first byte is used for the sign). Although it is usually impossible to key in packed decimal data directly from a terminal, many programs write packed decimal data. The decimal range is 1
through 31.
Suppose your data contain the following packed decimal number:
80 00 11 43
If you use the PD4. informat, this value is read as the double-precision value -1143.0. Similarly, the following value is read as 1500.0:
00 00 15 00
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.