Reads numeric data that are stored in real binary (floating-point)
notation.
-
w
-
specifies the width of the input field.
-
d
-
specifies the power of 10 by which to divide
the value. This argument is optional.
Note: Different operating environments store real binary
values in different ways. However, the RBw.d informat reads real binary values with consistent results
if the values are created on the same type of operating environment that you
use to run SAS.
The following table compares the names
of real binary notation in several programming languages:
|
Real Binary Notation |
Language |
4 Bytes |
8 Bytes |
SAS |
RB4. |
RB8. |
Fortran |
REAL*4 |
REAL*8 |
C |
float |
double |
IBM 370 assembler |
F |
D |
PL/I |
FLOAT BIN(21) |
FLOAT BIN(53) |
- CAUTION:
- Using the RBw.d informat to read real binary
information
on equipment that conforms to the IEEE standard for floating-point numbers
results in a truncated eight-byte number (double-precision), rather than in
a true four-byte floating-point number (single-precision).
input @1 x rb8.;
Data Line* |
Results |
----+----1
|
|
4280000000000000
|
128
|
*
The data line is a hexadecimal representation of a real
binary (floating-point) number on an IBM mainframe operating environment.
Each byte occupies one column of the input field. |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.