NLS Support in SPD Server

Overview of NLS Support

SPD Server contains support for a subset of the SAS 9 NLS functions documented above. SPD Server uses encoding and locale currently only on SAS software.
In future releases of SPD Server, the locale identifier information will be used for locale-sensitive case folding and linguistic collation. Case-folding is defined as a process applied to a sequence of characters, in which those identified as non-uppercase are replaced by their uppercase equivalents. Linguistic collation is performing linguistic sorts based on linguistic sort keys. However, those functions have yet to be implemented in SPD Server production code.
All tables that are produced by SPD Server and SAS inherit the SAS session's default encoding and locale settings. By default, SPD Server code expects new tables to follow the current SAS session's encoding and locale. Table updates that append rows or update existing rows will perform transcoding to ensure that appended and updated table rows match the existing table encoding.
Wire transfer is in the character set encoding of the SAS session for transfers to and from the SPD Server host, unless SPD Server transcoding has been disabled. SPD Server transcoding is enabled or disabled by inserting a [NO]NLSTRANSCODE statement in the SPD Server spdsserv.parm parameter file.

SPD Server NLS Limitations

Affected Data

SPD Server hosts are restricted in the way they handle NLS character strings. SPD Server hosts are restricted to data that is contained in character columns in data sets and some metadata structures. The NLS support for SPD Server is functional for only table labels and variable labels.
Column names, index names, table names, and catalog names are not supported in the SPD Server NLS support. Column names, index names, table names, and catalog names are still dependent on ASCII support. SPD Server SQL is subject to the NLS same restrictions.

Pass-Through SQL

SPD Server Pass-Through SQL does not support any NLS functions. Pass-through SQL operates in the encoding and locale of the SAS session that initiates the CONNECT to SASSPDS.

Case Folding and Sort Sequences

SPD Server NLS code supports very limited English Latin1 and Polish Latin2 case folding for SBCS encodings. UTF8 case folding is limited to the ASCII range of UTF8 encoding. NLS Sort sequences for SPD Server 4.5 are restricted to lexical sorts for all combinations. Linguistic sorting is a subject for future SPD Server releases.

Indexes and Ordering

Indexes in SPD Server are created in the table's encoding, and only support lexical ordering. If the client's encoding and locale settings match the SPD Server host table's encoding and locale settings, index use is unrestricted. Otherwise, index usage is restricted to certain predicates in WHERE clauses that can be safely interpreted according to the table's encoding and locale settings. When the client and host table encoding and locale settings differ, the EVAL2 strategy is used to filter predicates that require use of order.

Date and Time Representations

SPD Server server-side functions and formats that produce or accept textual date, time, and date/time representations are not locale-sensitive.

Suppressing Transcoding

You can suppress transcoding in the SPD Server environment by entering the following into the spdsserv.parm options:
NONLSTRANSCODE;
If you add the NONLSTRANSCODE option to your spdsserv.parm file, character transcoding between the SPD Server host and connected clients is disabled. Disabling character transcoding restricts the types of operations that the SPD Server host performs to operations it can safely perform, where host and client tables share the same encoding. Disabling SPD Server host transcoding assumes that the client will perform any needed transcoding on the data streams that it sends and receives to match the encoding of referenced tables. The SPD Server host setting for NONLSTRANSCODE does not perform any actions to deny client access to a host table that has mismatched encoding.

LIBNAME Option Restrictions:

The following options are not implemented in the SPD Server NLS functions:
The LIBNAME option
OUTENCODING=<client-server encoding> 
is not supported and will produce a WARNING message if submitted to sasspds.
In addition, the related data set option
ENCODING=<client-server encoding>
is supported by the SAS LIBNAME engine for OUTPUT data sets only. Character data is assumed to be in the encoding of the session that initiates the CONNECT to SASSPDS and is normally stored using that encoding. ENCODING= will cause SPD Server to transcode from the SAS session encoding to the specified encoding for storing data. If you specify ENCODING= for a data set that is not an OUTPUT data set, and if the encoding value that you specify does not match the data set's encoding, when you open the data set, SPD Server produces a warning:
ENCODING= specified on table open fails to match table
encoding. Option ignored.
The LIBNAME option
TRUNCWARN=YES 
Suppresses hard failure on NLS transcoding overflow and character mapping errors. When using the TRUNCWARN=YES LIBNAME option, data integrity can be compromised because significant characters can be lost in this configuration. The default setting is NO, which causes hard Read and Write stops when transcode overflow or mapping errors are encountered. When TRUNCWARN=YES, and an overflow or character mapping error occurs, a warning is posted to the SAS log at data set close time if overflow occurs, but the data overflow is lost.