HEXw. Format: z/OS

Converts real binary (floating-point) values to hexadecimal values.
Category: Numeric
Alignment: left
Default: 8
Range: 1-16 bytes
z/OS specifics: Writes output as EBCDIC, IBM floating-point format
See: HEXw. Format in SAS Formats and Informats: Reference

Details

Each hexadecimal character is written using the EBCDIC code, which requires one byte per hexadecimal character. For a table of commonly used EBCDIC characters, see EBCDIC Code: Commonly Used Characters.
The format of floating-point numbers is host-specific. See SAS Language Reference: Concepts for a description of the IBM floating-point format that is used under z/OS.
The w value of the HEXw. format determines whether the number is written as a floating-point number or as an integer. When you specify a width value of 1 through 15, the real binary numbers are truncated to fixed-point integers before being converted to hexadecimal representation. When you specify 16 for the width, the floating-point values are used, and the numbers are not truncated.
The following table contains examples that illustrate the use of HEXw. under z/OS:
Value
Format
Results
Notes
31.5
hex16.
421F800000000000
floating-point number
31.5
hex15.
00000000000001F
integer
-31.5
hex16.
C21F800000000000
floating-point number
-31.5
hex15.
FFFFFFFFFFFFFE1
integer
Note: In these examples, the Value column represents the value of the SAS numeric variable. The Results column shows what the numeric value looks like when viewed from a text editor.