Chapter Contents

Previous

Next
SAS Companion for UNIX Environments

Character Variables

In the SAS System under UNIX, character values are sorted by using the ASCII collating sequence.

The following character informats and formats produce different results in different operating environments, depending on which character-encoding system the operating system uses. Because UNIX uses the ASCII character-encoding system, the following informats and formats convert data to or from ASCII.

$ASCIIw.
Since ASCII is the native format under UNIX, this informat performs no conversion. The $ASCII format behaves exactly like $CHAR (see SAS Language Reference: Dictionary).

$BINARYw.
This informat converts binary values to ASCII character data, and this format converts ASCII character data to binary values.

$CHARZBw.
This informat reads character data and converts any byte that contains a binary zero to a blank.

$EBCDICw.
This informat converts EBCDIC character data to ASCII, and this format converts ASCII character data to EBCDIC.

$HEXw.
This informat converts hexadecimal data to ASCII character data, and this format converts ASCII character data to hexadecimal data.

$OCTALw.
This informat converts octal data to ASCII character data, and this format converts ASCII character data to octal data.

$PHEXw.
This informat converts packed hexadecimal data to ASCII character data.

All of the information that you need to use these informats and formats under UNIX is in SAS Language Reference: Dictionary.

Character dummy variables (those whose only purpose is to hold 0 or 1) can be stored in a variable whose length is 1 byte.


Chapter Contents

Previous

Next

Top of Page

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