HEXw. Informat

Converts hexadecimal positive binary values to either integer (fixed-point) or real (floating-point) binary values.
Category: Numeric
See: HEXw. Informat: UNIX in SAS Companion for UNIX Environments

HEXw. Informat: Windows in SAS Companion for Windows

HEXw. Informat: z/OS in SAS Companion for z/OS

Syntax

HEXw.

Syntax Description

w
specifies the field width of the input value and also specifies whether the final value is fixed-point or floating-point.
Default:8
Range:1–16
Tip:If w<16, HEXw. converts the input value to positive integer binary values, treating all input values as positive (unsigned). If w is 16, HEXw. converts the input value to real binary (floating-point) values, including negative values.

Details

Operating Environment Information: Different operating environments store floating-point values in different ways. However, HEX16. reads hexadecimal representations of floating-point values with consistent results if the values are expressed in the same way that your operating environment stores them.
The HEXw. informat ignores leading or trailing blanks.

Example

input @1 x hex3. @5 y hex16.;
Data Line 1
Result
----+----1----+----2
88F 4152000000000000
2191 5.125
1The data line shows IBM mainframe hexadecimal data.