The OLAP Procedure

USER_DEFINED_TRANSLATIONS Statement

Specifies the locales that are associated with the data sets that you specify in the DIMENSION statement. The USER_DEFINED_TRANSLATIONS statement is required to use the Multiple Language Support capabilities of the SAS OLAP Server. Alternative statement names are UDT and USER_DEFINED_TRANSLATION.

Syntax

USER_DEFINED_TRANSLATIONS | UDT locale <locale2 ...localeN> ;

Details

Overview

PROC OLAP uses the UDT statement information, along with DIMENSION statement options, to read your alternate locale data sets and create locale-specific metadata for use at query time. Query results are returned in the language of the requested locale. The Multiple Language Support feature is available only for cubes that are loaded from a star schema. The alternate locale data set names consist of a prefix, which indicates the member, and a suffix, which indicates the language. The UDT statement supplies the suffix. The DIMTABLEMEMPREF= option in the DIMENSION statement specifies the member prefix. For example, if the member prefix is dealdim_ and the suffix is pl_PL, then PROC OLAP looks for a data set named dealdim_pl_PL.sas7bdat in the library that is specified by the DIMTABLELIBREF= option.
The default locale is the first locale specified in the UDT statement. Data sets in the default locale do not use the suffix that is defined by the UDT statement.

Required Argument

locale
specifies the locales that correspond to the data sets contained in the library that is specified by the DIMTABLELIBREF= option in the DIMENSION statement. Separate locales with a space. Locales are specified using the standard Posix five-character notation, as specified in “LOCALE= Values and Default Settings for ENCODING, PAPERSIZE, DFLANG, and DATESTYLE Options,” in the SAS 9.3 National Language Support (NLS): Reference Guide. Your cube can specify any of the locales that are valid for the SAS system option LOCALE=.
Note:The first locale specified is the default locale of your cube. This default locale must match the locale of your SAS session.

SAS Servers and Character Encoding

If your server metadata contains characters other than those typically found in English, then you must be careful to start your server with an ENCODING= or LOCALE= system option that accommodates those characters. For example, a SAS server started with the default US English locale cannot read metadata that contains Japanese characters. SAS will fail to start and will log a message indicating a transcoding failure.
In general, different SAS jobs or servers can run different encodings (such as ASCII/EBCDIC or various Asian DBCS encodings) as long as the encoding that is used by the particular job or server can represent all the characters of the data being processed. In the context of server start up, this requires that you review the characters used in the metadata describing your server (as indicated by the SERVER= object server parameter) to ensure that SAS runs under an encoding that supports those characters.

Example

The following sample code looks for these dimension data sets in the mylib library. In this example, Polish is the default locale, so the suffix is not used.
dimension date
   hierarchies=(date)
   sort_order=ascending
   dimtablelibref=mylib
   dimtablemempref=ctimedim_
   factkey=dte
   dimkey=dte
   ;
hierarchy date levels=(dte)
   ;
level dte
   ;
dimension cars
   hierarchies=(cars)
   sort_order=ascending
   dimtablelibref=mylib
   dimtablemempref=cardim_
   factkey=carkey
   dimkey=carkey
   ;
dimension cars
   levels=(car color)
   ;
dimension dealers
   hierarchies=(dealers)
   sort_order=ascendng
   dimtablelibref=mylib
   dimtablemempref=dealdim_
   factkey=dealerkey
   dimkey=dealerkey
   ;
hierarchy dealers
   levels=(dealer dest)
   ;
user_defined_translations
   pl_PL   /* Polish as used in Poland; default locale */
   en_US   /* English as used in the United States */
   ja_JP   /* Japanese as used in Japan */
   ;
The following table shows the expected data set names for each of the locales specified in the UDT statement.
Locales and Associated Data Set Names
Locale
Default
Dimension Data Sets
English
No
ctimedim_en_US
cardim_en_US
dealdim_en_US
Japanese
No
ctimedim_ja_JP
cardim_ja_JP
dealdim_ja_JP
Polish
Yes
ctimedim_
cardim_
dealdim_