Converts real binary (floating-point) values to hexadecimal
values.
Numeric |
|
Width range: |
1-16 bytes
|
Default width: |
8
|
Alignment: |
left
|
z/OS specifics: |
writes output as EBCDIC, IBM floating-point
format
|
See: |
HEXw. Format in
SAS Language Reference: Dictionary
|
Each hexadecimal character is written using the EBCDIC code, which requires
one byte per hexadecimal character. See EBCDIC Code: Commonly Used Characters for a table of commonly used EBCDIC
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 examples 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. ![[cautionend]](../../../../common/63294/HTML/default/images/cautend.gif)
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.