All ILE COBOL applications running on the AS/400 and using locales of type *LOCALE have a current locale that is scoped to the activation group of the program. The current locale determines the behavior of locale-based numeric-edited, locale-based date and time data items, and locale intrinsic functions, that do not specify a locale mnemonic-name. The current locale can be set explicitly using the SET LOCALE statement. See the WebSphere Development Studio: ILE COBOL Reference for more information on using the SET LOCALE statement.
If the current locale is not set explicitly using SET LOCALE, it is implicitly set by the ILE COBOL runtime at program activation time. This is the same default locale that you can set using the DEFAULT keyword in Format 8 of the SET statement. Here is how the ILE COBOL runtime sets the current locale when a program is activated:
The current locale used by ILE COBOL is shared with ILE C compiler and ILE C++ compiler. This means that the ILE C compiler setlocale function that changes the current locale for ILE C compiler programs also affects the current locale for ILE COBOL programs, and the other way around.
For more information about how locales of type *LOCALE are enabled, see Using Coded Character Set Identifiers.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.