PDw.d Informat: Windows

Reads packed decimal data.
Category: numeric
Windows specifics: How values are interpreted as negative or positive
See: PDw.d Informat in SAS Formats and Informats: Reference

Syntax

PDw.d

Required Arguments

w
specifies the width of the input field.
Default:1
Range:1–16
d
specifies the power of 10 by which to divide the input value. If the data contain decimal points, then SAS ignores the d value.
Range:0–31

Details

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.

Example

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