Previous Page | Next Page

Formats

S370FRBw.d Format



Writes real binary (floating-point) data in IBM mainframe format.
Category: Numeric
Alignment: left

Syntax
Syntax Description
Details
Comparisons
Examples

Syntax

S370FRBw.d

Syntax Description

w

specifies the width of the output field.

Default: 4
Range: 2-8
d

specifies to multiply the number by 10d. This argument is optional.

Default: 0
Range: 0-10

Details

A floating-point value consists of two parts: a mantissa that gives the value and an exponent that gives the value's magnitude.

Use S370FRBw.d in other operating environments to write floating-point binary data in the same format as on an IBM mainframe computer.


Comparisons

The following table shows the notation for equivalent floating-point formats in several programming languages:

Language 4 Bytes 8 Bytes
SAS S370FRB4. S370FRB8.
PL/I FLOAT BIN(21) FLOAT BIN(53)
Fortran REAL*4 REAL*8
COBOL COMP-1 COMP-2
IBM 370 assembler E D
C float double


Examples

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

Value of x Results*
128
42800000
-123
C2800000
* The result is a hexadecimal representation of a binary number in zoned decimal format on an IBM mainframe computer. Each two hexadecimal digits correspond to one byte of binary data, and each byte corresponds to one column of the output field.

Previous Page | Next Page | Top of Page