Previous Page | Next Page

Formats under OpenVMS

PDw.d Format: OpenVMS



Writes values in packed decimal format.
Category: numeric
Width range: 1 to 16
Default width: 1
Decimal range: 0 to 10
Alignment: left
OpenVMS specifics: overflow behavior
See: PDw.d Format in SAS Language Reference: Dictionary

Syntax
Details
Example
See Also

Syntax

PDw.d

w

specifies the width of the output field in bytes (not digits).

d

specifies a scaling factor. The scaling factor is optional. When you specify a d value, the PDw.d format multiplies the number by the 10d value, and then applies the packed decimal format to that value.


Details

Under OpenVMS, if the value to be formatted is too large to fit in a field of the specified width, then the PDw.d format does the following:

The PDw.d format writes missing numerical data as -0. When the PDw.d informat reads -0, it stores it as 0.


Example

If you format the value 300 using the PD1. format, you receive the following hexadecimal string:

'9C'x

which is the packed decimal representation for 9.

If you format the value -300 using the PD1. format, you receive the following hexadecimal string:

'9D'x

which is the packed decimal representation for -9.


See Also

Previous Page | Next Page | Top of Page