Chapter Contents |
Previous |
Next |
PDw.d |
Category: | Numeric |
Alignment: | left |
Syntax | |
Syntax Description | |
Details | |
Comparisons | |
Examples |
Syntax |
PDw.d |
Default: | 1 |
Range: | 1-16 |
Details |
Different operating environments store packed decimal values in different ways. However, the PDw.d format writes packed decimal values with consistent results if the values are created in the same kind of operating environment that you use to run SAS.
Comparisons |
The following table compares packed decimal notation in several programming languages:
Language | Notation |
---|---|
SAS | PD4. |
COBOL | COMP-3 PIC S9(7) |
IBM 370 assembler | PL4 |
PL/I | FIXED DEC |
Examples |
y=put(x,pd4.); put y $hex8.;
Values | Results* |
---|---|
----+----1 |
|
128 |
0000128 |
*The result is a hexadecimal representation of a binary number written in packed decimal format. Each byte occupies one column of the output field. |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.