Informats |
Category: | Character |
See: | $HEXw. Informat under Windows UNIX OpenVMS |
Syntax | |
Syntax Description | |
Details | |
Comparisons | |
Examples |
Syntax |
$HEXw. |
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 Line | Results | |
---|---|---|
----+----1 |
ASCII | EBCDIC |
6C6C |
ll |
%% |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.