Previous Page | Next Page

Formats

S370FPDw.d Format



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

Syntax
Syntax Description
Details
Comparisons
Examples

Syntax

S370FPDw.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 S370FPDw.d in other operating environments to write packed decimal data in the same format as on an IBM mainframe computer.


Comparisons

The following table shows the notation for equivalent packed decimal formats in several programming languages:

Language Packed Decimal Notation
SAS S370FPD4.
PL/I FIXED DEC(7,0)
COBOL COMP-3 PIC S9(7)
IBM 370 assembler PL4


Examples

y=put(x,s370fpd4.);
put y $hex8.;

Value of x Results
 
----+----1
128
0000128C
* The result is a hexadecimal representation of a binary number written in packed decimal format. Each byte occupies one column of the output field.

Previous Page | Next Page | Top of Page