Writes data in unsigned packed decimal format.
Category: |
Numeric
|
Alignment: |
left
|
-
w
-
specifies the width of the output field.
-
d
-
specifies to multiply the number by 10d. This argument is optional.
Default: |
0 |
Range: |
0-10 |
Requirement: |
must be less than w |
Each byte of unsigned packed decimal data
contains two digits.
The PKw.d format is similar to the
PDw.d format except that PKw.d does not write the sign in the low-order
byte.
y=put(x,pk4.);
put y $hex8.;
Value of x |
Results* |
|
----+----1
|
128
|
00000128
|
*
The result is a hexadecimal representation of a four-byte
number written in packed decimal format. Each byte occupies one column of
the output field. |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.