Previous Page | Next Page

The OLAP Procedure

USER_DEFINED_TRANSLATIONS Statement

The USER_DEFINED_TRANSLATIONS statement is required to use the Multiple Language Support capabilities of the SAS OLAP Server. This statement specifies the locales that are associated with the data sets that you specify in the DIMENSION statement.

USER_DEFINED_TRANSLATIONS locale <locale2 ...localeN> ;

Note:   Alternative statement names are UDT and USER_DEFINED_TRANSLATION.  [cautionend]

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 DEFINE 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 following sample code looks for these dimension data sets in the mylib library. The default locale is the first locale specified in the UDT statement. Additionally, the default locale does not use the suffix that is defined by the UDT statement. 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 */
   en_US   /* English as used in the United States */
   ja_JP   /* Japanese as used in Japan */
   ;

Locales and Associated Data Set Names
Locale Dimension Data Sets
English ctimedim_en_US cardim_en_US dealdim_en_US
Japanese ctimedim_ja_JP cardim_ja_JP dealdim_ja_JP
Polish ctimedim_ cardim_ dealdim_


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.


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.

Previous Page | Next Page | Top of Page