Writes real binary (floating-point) data in IBM mainframe
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.
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.
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 |
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. |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.