Chapter Contents

Previous

Next
$HEXw.

$HEXw.



Converts hexadecimal data to character data

Category: Character


Syntax
Syntax Description
Details
Comparisons
Examples

Syntax

$HEXw.

Syntax Description

w
specifies the number of digits of hexadecimal data.

If w=1, $HEXw. pads a trailing hexadecimal 0. If w is an odd number that is greater than 1, then $HEXw. reads w-1 hexadecimal characters.
Default: 2
Range: 1-32767


Details

The $HEXw. informat converts every two digits of hexadecimal data into one byte of character data. Use $HEXw. to encode hexadecimal values into a character variable when your input method is limited to printable characters.


Comparisons

The HEXw. informat reads two digits of hexadecimal data at a time and converts them into one byte of numeric data.


Examples

input @1 name $hex4.;

Data Lines Results
----+----1
ASCII EBCDIC
6C6C
11
%%


Chapter Contents

Previous

Next

Top of Page

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