The concept of a locale defined by language and territory
provides a platform-independent method of specifying international
language-dependent settings. NLS functions translate the IBM Smalltalk
locale names to platform values as illustrated in the following figure:
VisualAge Smalltalk Server uses the LE/370 locale support, which defines a language/territory combination that dictates particular conventions for the presentation of information, such as collation order, character classification, monetary and numeric formats, and data and time formats. See the C/MVS Programming Guide or C++/MVS Programming Guide for information about how to change a locale or create a new one.
When started in the target environment, your application uses the LE/370 locale settings defined by your installation. If Smalltalk does not recognize the current LE/370 locale it uses the values of the locale, but the language and territory values are set to <unknown>.
There are several ways to set the locale for which VisualAge Smalltalk Server will run under. LE/370 provides two user exit routines in which the default locale can be specified, CEEBXITA (an Assembler user exit) and CEEBINT (an HLL user exit that can be written in C, PL/1 or LE/370-conforming Assembler). These can be linked with the LE/370 initialization/termination library routines during installation to function as an installation-wide user exit. They can also be customized for your application. When CEEBXITA or CEEBINT is linked in your load module, it functions as an application-specific user exit. The application-specific exit is used only when you run that application. The installation-wide Assembler user exit is not executed.
To obtain an application-specific user exit, you must explicitly include it at link-edit time in the application load module. Any time the application-specific exit is modified, it must be relinked with the application. To link in the application-specific exit with your VisualAge Smalltalk Server application, you need to modify or override the LKED.SYSLIN DD statement in the build load module PROC to include the application-specific user exit. For example, the override for LKED.SYSLIN for PROC ABTBMF1B in ABT.V4R5M0.SABTJLIB(ABTBBLD) is as follows:
//*------------------------------------------------------------------- //* CREATE SINGLE LOAD MODULE FOR IMAGE EXECUTION //*------------------------------------------------------------------- //ABTBMF1B EXEC PROC=ABTBMF1B, // OUTFILE='ABT.CICSTEST.SABTCLOD', // IMAGE=LOCALTST //LKED.SYSLIN DD DSN=*.PREP.MAIN,DISP=(OLD,DELETE) // DD DSN=ABT.V4R5M0.SABTOBJ(ABTBMN),DISP=SHR // DD DSN=ABT.V4R5M0.SABTOBJ(ABTXABND),DISP=SHR // DD DSN=YOURHLQ.LOCALE.LOADLIB(CEEBINT),DISP=SHR //
Here is an example of the HLL CEEBINT user exit written in C that sets the LC_ALL environment variable to the English U.S. Locale with the IBM-037 code page:
/* CEEBINT LE/370 HLL user exit to set the LC_ALL environment variable to the En_US.IBM-037 Locale */ #pragma map(CEEBINT,"CEEBINT") #pragma linkage(CEEBINT,OS) #include #include void CEEBINT(int numParms, int rtCode, int rsCode, int funcCode, void **mainEntryPoint, int userWord, void **A_Exit) { setenv("LC_ALL", "En_US.IBM-037", 1); return; }
The following table details the mapping from VisualAge Smalltalk Server
locale definitions to the OS/390 platform values. (Locales that are not
directly supported by OS/390 are marked in the table with a horizontal
bar.)
Table 8. Map from locale names to OS/390 platform mappings
Locale language | Locale territory | Locale mappings |
---|---|---|
Albanian | Albania | 'Sq_AL.IBM-500' or 'Sq_AL.IBM-1047' |
Arabic | Arabic | - |
Bulgarian | Bulgaria | 'Bg_BG.IBM-1025' |
Croatian | YugoCroatian | - |
Czech | Czech Republic | 'Cs_CZ.IBM-870' |
Danish | Denmark | 'Da_DK.IBM-1047' or 'Da_DK.IBM-277' |
Dutch | Belgium | 'N1_BE.IBM-1047' or 'N1_BE.IBM-500' |
Dutch | Netherlands | 'N1_NL.IBM-1047' or 'N1_NL.IBM-037' |
Elinka | Greece | 'E1_GR.IBM-875' |
English | Australia | - |
English | Britain | 'En_GB.IBM-1047' or 'En_GB.IBM-285' |
English | Canada | - |
English | Ireland | - |
English | Japan | 'En_JP.IBM-1027' |
English | New Zealand | - |
English | U.S. | 'En_US.IBM-1047' or 'En_US.IBM-037' |
Estonian | Estonia | 'Et_EE.IBM-1122' |
Faeroese | FaeroeIsl | - |
Farsi | Iran | - |
Finnish | Finland | 'Fi_FI.IBM-1047' or 'Fi_FI.IBM-278' |
French | Belgium | 'Fr_BE.IBM-1047' or 'Fr_BE.IBM-500' |
French | Canada | 'Fr_CA.IBM-1047' or 'Fr_CA.IBM-037' |
French | France | 'Fr_FR.IBM-1047' or 'Fr_FR.IBM-297' |
French | Switzerland | 'Fr_CH.IBM-1047' or 'Fr_CH.IBM-500' |
German | Austria | - |
German | Germany | 'De_DE.IBM-1047' or 'De_DE.IBM-273' |
German | Switzerland | 'De_CH.IBM-1047' or 'De_CH.IBM-500' |
Greek | Greece | 'E1_GR.IBM-875' |
Hebrew | Israel | 'Iw_IL.IBM-424' |
Hindi | India | - |
Hungarian | Hungary | - |
Icelandic | Iceland | 'Is_IS.IBM-1047' or 'Is_IS.IBM-871' |
Italian | Italy | 'It_IT.IBM-1047' or 'It_IT.IBM-280' |
Italian | Switzerland | - |
Japanese | Japan | 'Ja_JP.IBM-1027', 'Ja_JP.IBM-290', 'Ja_JP.IBM-930' or 'Ja_JP.IBM-939' |
Korean | Korea | 'Ko_KR.IBM-933' |
Lappish | Lapland | - |
Lettish | Latvia | - |
Lithuanian | Lithuania | 'Lt_LT.IBM-1112' |
Macedonian | Macedonia | 'Mk_MK.IBM-1025' |
Maltese | Malta | - |
Norwegian | Norway (Bokmal) | 'No_NO.IBM-1047' or 'No_NO.IBM-277' |
Norwegian | Norway (Nynorsk) | - |
Polish | Poland | - |
Portuguese | Brazil | 'Pt_BR.IBM-1047' or 'Pt_BR.IBM-037' |
Portuguese | Portugal | 'Pt_PT.IBM-1047' or 'Pt_PT.IBM-037' |
Romanian | Romania | 'Ro_RO.IBM-870' |
Russian | Russia | 'Ru_RU.IBM-1025' |
Serbian (Cyrillic) | Serbia | 'Sr_SP.IBM-1025' |
Serbian (Latin) | Serbia | 'Sh_SP.IBM-870' |
Simplified Chinese | China | 'Zh_CN.IBM-935' or 'Zh_CN.IBM-1388' |
Slovak | Czechoslovakia | - |
Slovak | Slovakia | 'Sk_SK.IBM-870' |
Slovene | Slovenia | 'S1_SL.IBM-870' |
Spanish | Mexico | - |
Spanish | Spain (Mod) | - |
Spanish | Spain (Trad) | 'Es_ES.IBM-1047' or 'Es_ES.IBM-284' |
Swedish | Sweden | 'Sv_SE.IBM-1047' or 'Sv_SE.IBM-278' |
Thai | Thailand | 'th.TH.IBM-838' |
Traditional Chinese | Taiwan | 'Zh_TW.IBM-937' |
Turkish | Turkey | 'Tr_TR.IBM-1026' |
Urdu | Pakistan | - |