RENCODING= Option

Specifies the ASCII-based or EBCDIC-based encoding to use for transcoding data for a SAS/SHARE server session that is using an EBCDICANY or ASCIIANY session encoding.
Valid in: LIBNAME statement for SAS/SHARE only
Category: Data Access
Note: The RENCODING= option in the LIBNAME statement is relevant only if using a SAS/SHARE server that has a session encoding set to EBCDICANY or ASCIIANY to preserve a mixed-encoding computing environment, which was more common before SAS 9.
See: LIBNAME statement in SAS/SHARE User's Guide

Syntax

RENCODING=ASCII-encoding-value | EBCDIC-encoding-value

Syntax Description

ASCII-encoding-value
For a list of valid values for ASCII encodings for UNIX and Windows, see Encoding Values for a SAS Session.
EBCDIC-encoding-value
For a list of valid values for EBCDIC encodings for z/OS, see Encoding Values for a SAS Session.

Details

If you use SAS/SHARE in a mixed-encoding environment (for example, SAS/SHARE client sessions using incompatible encodings such as Latin1 and Latin2), you can set the following options:
  • in the SAS/SHARE server session, set the SAS system option ENCODING=EBCDICANY or ENCODING=ASCIIANY
  • in the SAS/SHARE client session, set the RENCODING= option in the LIBNAME statement(s) under these conditions:
    • a client session that uses an ASCII-based encoding accesses an EBCDICANY server
    • a client session that uses an EBCDIC- based encoding accesses an ASCIIANY server.
    The RENCODING= option enables SAS/SHARE clients to specify which encoding to assume the server's data is in when transcoding to or from the client session encoding.
For SAS 9 and 9.2, if you are processing data in a SAS/SHARE client/server session from more than one SBCS or DBCS encoding, you are advised to use the UTF8 encoding. For more information about Unicode servers that run the UTF8 session encoding, go to http://rnd.sas.com/sites/i18n/i18ndocs/i18nsupport/Pages/SAS%20Technical%20Papers.aspx and search for SAS 9.1.3 Service Pack 4 in a Unicode Environment and Processing Multilingual Data with the SAS® 9.2 Unicode Server.

Comparisons

In SAS 9 and 9.2, you can maintain multilingual data that contains characters from more than one traditional SBCS or DBCS encoding in a SAS data set by using a UTF8 encoding. To share update access to that data using SAS/SHARE, you must also run the SAS/SHARE server using a session encoding of UTF8. SAS will transcode the data to the client encoding if necessary.
Before SAS 9, if a SAS/SHARE client and a SAS/SHARE server ran on common architectures (for example, the client and server ran on UNIX machines), there was no automatic transcoding of character data. It was possible to build applications that accessed data sets in different EBCDIC or ASCII encodings within a single SAS/SHARE server, or that accessed data sets in mixed different encodings within a single data set. This method was very uncommon and required careful programming to set up transcoding tables from clients that ran in different operating environments.
The following steps describe how you can maintain mixed encoding in SAS 9, if necessary.
  • The SAS/SHARE server must run by using a session encoding of EBCDICANY for mixed-EBCDIC encodings or ASCIIANY for mixed-ASCII encodings.
    This will restore the behavior of Version 8 and earlier releases and prevent the automatic character transcoding between different client and server encodings in the same EBCDIC or ASCII family. That is, no transcoding will occur under these circumstances:
    • if the client session encoding is an EBCDIC encoding and the server session encoding is EBCDICANY
    • if the client session encoding is an ASCII encoding and the server session encoding is ASCIIANY.
  • A SAS/SHARE client that does not share the same encoding family as an ASCIIANY or EBCDICANY server can control the necessary transcoding by using an RENCODING= option on the first LIBNAME statement that accesses the server.
    For example, an ASCII client that runs in a Polish locale could access a z/OS EBCDICANY server and specify RENCODING=EBCDIC870 to access data that the client knows contains Polish-encoded data. Another ASCII client that runs in a German locale could access the same z/OS EBCDICANY server and specify RENCODING=EBCDIC1141 to access data that the client knows contains German data. Similarly, EBCDIC clients that access an ASCIIANY server can specify the precise ASCII encoding of the data that they are accessing by using the RENCODING= option in the LIBNAME statement.

See Also

Conceptual Information: