S370FPDUw.d Format

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

Syntax

S370FPDUw.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–31

Details

Use S370FPDUw.d in other operating environments to write unsigned packed decimal data in the same format as on an IBM mainframe computer.

Comparisons

  • The S370FPDUw.d format is similar to the S370FPDw.d format except that the S370FPDw.d format always uses the absolute value instead of the signed value.
  • The S370FPDUw.d format is equivalent to the COBOL notation PIC 9(n) PACKED-DECIMAL, where the n value is the number of digits.

Example

y=put(x,s370fpdu2.);
put y $hex4.;
Value of x
Result 1
123
123F
-123
123F
1The result is a hexadecimal representation of a binary number written in packed decimal format. Each two hexadecimal characters correspond to one byte of binary data, and each byte corresponds to one column of the output field.