Previous Page | Next Page

Encoding for NLS

Encoding Behavior in a SAS Session

Encoding Support for Data Sets by SAS Release

For Base SAS files, there are three categories of encoding support, which is based on the version of SAS that created the file:

z/OS: Ensuring Compatibility with Previous SAS Releases

Setting the NLSCOMPATMODE system option ensures compatibility with previous releases of SAS.

Note:   NLSCOMPATMODE is supported under the z/OS operating environment only.  [cautionend]

Programs that were run in previous releases of SAS will continue to work when NLSCOMPATMODE is specified.

The NONLSCOMPATMODE system option specifies that data is to be processed in the encoding that is set by the ENCODING= option or the LOCALE= option, including reading and writing external data and processing SAS syntax and user data.

Some existing programs that ran in previous releases of SAS will no longer run when NONLSCOMPATMODE is in effect. If you have made character substitutions in SAS syntax statements, you must modify your programs to use national characters. For example, a Finnish customer who has substituted the Å character for the $ character in existing SAS syntax will have to update the program to use the $ in the Finnish environment.

For details, see NLSCOMPATMODE System Option: z/OS.

Output Processing

When you create a data set in SAS 9, encoding is determined as follows:

Input Processing

For input (read) processing in SAS 9, encoding behavior is as follows:

Reading and Writing External Files

SAS reads and writes external files using the current session encoding. SAS assumes that the external file has the same encoding as the session encoding. For example, if you are creating a new SAS data set by reading an external file, SAS assumes that the encoding of the external file and the current session are the same. If the encodings are not the same, the external data could be written incorrectly to the new SAS data set. For details about the syntax for the SAS statements that perform input and output processing, see SAS Options That Transcode SAS Data.

Previous Page | Next Page | Top of Page