Chapter Contents

Previous

Next
$HEXw.

$HEXw.



Converts character data to hexadecimal representation

Category: Character
Alignment: left


Syntax
Syntax Description
Details
Comparisons
Examples

Syntax

$HEXw.

Syntax Description

w
specifies the width of the output field.
Default: The default width is calculated based on the length of the variable to be printed.
Range: 1-32767
Tip: To ensure that SAS writes the full hexadecimal equivalent of your data, make w twice the length of the variable or field that you want to represent.
Tip: If w is greater than twice the length of the variable that you want to represent, $HEXw. pads it with blanks.


Details

The $HEXw. format converts each character into two hexadecimal digits. Each blank counts as one character, including trailing blanks.


Comparisons

The HEXw. format converts real binary numbers to their hexadecimal equivalent.


Examples

put @5 name $hex4.;

Values Results

EBCDIC ASCII

----+----1
----+----1
AB
    C1C2
    4142


Chapter Contents

Previous

Next

Top of Page

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