RBw.d Informat

Reads numeric data that is stored in real binary (floating-point) notation.

Category: Numeric
Interaction: List input is incompatible with binary input when this informat is specified in an INFORMAT= statement or an ATTRIB= statement using the INFORMAT= argument. SAS issues a warning and uses formatted input to read the data.
See: RBw.d Informat: UNIX in SAS Companion for UNIX Environments
RBw.d Informat: Windows in SAS Companion for Windows
RBw.d Informat: z/OS in SAS Companion for z/OS

Syntax

RBw.d

Syntax Description

w

specifies the width of the input field.

Default 4
Range 2–8

d

specifies the power of 10 by which to divide the value. This argument is optional.

Range 0–10

Details

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.

Comparisons

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 about 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).

Example

input @1 x rb8.;   
Data Line 1
Result
----+----1
4280000000000000
128
1The 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.

See Also

Informats: