Chapter Contents |
Previous |
Next |
S370FRBw.d |
Category: | Numeric |
Alignment: | left |
Syntax | |
Syntax Description | |
Details | |
Comparisons | |
Examples |
Syntax |
S370FRBw.d |
Default: | 6 |
Range: | 2-8 |
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.;
Values | 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. |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.