Previous Page | Next Page

Informats under z/OS

HEXw. Informat: z/OS



Converts hexadecimal character values to integer binary (fixed-point) or real binary (floating-point) values.
Numeric
Width range: 1-16 bytes
Default width: 8
z/OS specifics: interprets input as EBCDIC, IBM floating-point format
See: HEXw. Informat in SAS Language Reference: Dictionary

Details
See Also

Details

Under z/OS, each hexadecimal character that is read by the HEX informat must be represented using the EBCDIC code, with one digit per byte. For example, the hexadecimal number '3B'x is actually stored in the external file as the bit pattern represented by 'F3C2'x, which is the EBCDIC code for 3B. (See EBCDIC Code: Commonly Used Characters for a table of commonly used EBCDIC characters.)

The format of floating-point numbers is host specific. See the data representation information in SAS Language Reference: Concepts for a description of the IBM floating-point format that is used under z/OS.

The w value of the HEX informat specifies the field width of the input value. It also specifies whether the final value is an integer binary (fixed-point) value or a real binary (floating-point) value. When you specify a width value of 1 through 15, the input hexadecimal number represents an integer binary number. When you specify a width of 16, SAS interprets the input hexadecimal number as a representation of a floating-point number.

The following examples illustrate the use of HEXw.d under z/OS.

Data Line Informat Value Notes
433E800000000000 HEX16. 1000 input is interpreted as floating point
000100 HEX6. 256 input is interpreted as integer
C1A0000000000000 HEX16. -10 input is interpreted as floating point

Note:   In these examples, Data Line represents the bit pattern stored, which is the value seen when viewed in a text editor. Value is the number that is used by SAS after the data pattern has been read using the corresponding informat.  [cautionend]


See Also

Previous Page | Next Page | Top of Page