Chapter Contents

Previous

Next
HEXw.

HEXw.



Converts hexadecimal positive binary values to either integer (fixed-point) or real (floating-point) binary values

Numeric
Width range: 1-16 bytes
Default width: 8
OS/390 specifics: interprets input as EBCDIC, IBM floating-point format


Details
See Also


Details

Under OS/390, each hexadecimal digit 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 Representation of Floating-Point Numbers for a description of the IBM floating-point format that is used under OS/390.

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 OS/390.

Data Line (Hex) 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 (Hex) represents the bit pattern stored, which is the value seen when viewed in a text editor that displays values in hexadecimal representation. Value is the number that is used by SAS after the data pattern has been read using the corresponding informat.  [cautionend]

See Also


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.