PKw.d Format

Writes data in unsigned packed decimal format.
Category: Numeric
Alignment: left

Syntax

PKw.d

Syntax Description

w
specifies the width of the output field.
Default:1
Range:1–16
d
specifies to multiply the number by 10d. This argument is optional.
Default:0
Range:0–10
Requirement:must be less than w

Details

Each byte of unsigned packed decimal data contains two digits.

Comparisons

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.

Example

y=put(x,pk4.); 
put y $hex8.;
Value of x
Result 1
 
----+----1
128
00000128
1The result is a hexadecimal representation of a four-byte number written in packed decimal format. Each byte occupies one column of the output field.