ILE COBOL Programmer's Guide
The times at which a locale is identified, and the scope of its effect
after being identified are:
- When a run unit is activated, the default locale is identified and remains
the current locale for that run unit until it is changed within the run unit
by a SET statement. After the locale has been changed from the default,
the default can be made the current locale again by using the DEFAULT keyword
in Format 8 of the SET statement.
- For the LOCALE-DATE and LOCALE-TIME intrinsic functions, the current
locale is identified at the beginning of each statement that references any of
these functions, and is used for the evaluation of the function during that
statement. For more information about these intrinsic functions, refer
to the WebSphere Development Studio: ILE COBOL
Reference.
- When a LOCALE phrase is used in a PICTURE clause or a FORMAT clause, and
the mnemonic-name-1 is not specified, the current locale is
identified once at the start of each statement that edits or de-edits the data
item.
- Note:
- Switching locales between the editing and de-editing of a given data item can
result in unpredictable behavior. You are responsible for ensuring that
the locale used for de-editing is the same as the locale used for
editing.
- When a LOCALE phrase is used in a PICTURE clause or a FORMAT clause, and
mnemonic-name-1 is specified, the current locale is the one
associated with the mnemonic-name in the SPECIAL-NAMES paragraph. It
must be identified anytime before the first reference in a source unit to a
data item requiring its use. Its scope is that source unit.
- For a SET statement, the locale specified in the FROM phrase becomes the
current locale for the run unit, until it is changed again by another SET
statement.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.