Chapter Contents

Previous

Next
PDw.d

PDw.d



Reads packed decimal data

Category numeric
Width range: 1-16
Default width: 1
Decimal range: 0-31
Windows specifics: How values are interpreted as negative or positive


Syntax
Details
Example
See Also

Syntax

PDw.d

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.


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

See Also


Chapter Contents

Previous

Next

Top of Page

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