gtpa2m15Application Programming

C Language Locale

There is a locale associated with each C environment that consists of a set of constants that vary with geographic area, such as time zones and monetary symbols. Locales are often associated with particular countries, such as the USA or France. The setlocale function can be used to specify a particular locale.

In ISO-C, the default locale is defined in the ISO-C library (CISO) and resides in segment C$S370. The C locale is the first one set by the system; the other locales reside in separate DLMs. For TARGET(TPF) the locale resides in segment CL04, a part of CCLANG, the control program CSECT for C language.

In TARGET(TPF), pointers to locale information are stored in the first stack frame associated with an ECB. This stack frame is created and initialized the first time a C program or function is called (when the stack exception routine is invoked). A user exit is provided that allows you to specify the particular locale definitions you want to use.

For more information about defining locales, see Customizing C/C++ Language Support. For more information about the C stack exception routine user exit and others, see TPF System Installation Support Reference.