LOCALE phrase
When the LOCALE phrase is specified in the PICTURE clause,
editing is carried out according to the locale specifications. The
following rules apply:
- A BLANK WHEN ZERO clause takes precedence over locale editing.
- When mnemonic-name-1 is specified, the
locale used for editing
and de-editing the item is the one associated with mnemonic-name-1
in the SPECIAL-NAMES paragraph. Otherwise the current locale is used. Note: Switching locales between the editing and de-editing stages of an item can cause unpredictable results. You must ensure that the locale used for editing an item is the same as the locale used for de-editing an item.
- If a currency sign symbol (cs) is specified in the picture string, the position, length, and character-string used for the currency sign are determined from the locale.
- The decimal separator, thousands separator, and grouping are determined by the locale.
- Decimal point alignment and zero replacement take place as described in Alignment rules.
- If + is specified in the PICTURE character string, the way in which positive and negative numbers are represented is determined by a locale.
- The sending data is aligned on the decimal point, and (if necessary) truncated or padded with zeros at either end within the receiving character positions of the receiving data item. The data is also right-justified, with grouping and separators applied according to the locale specification. Leading zeros are replaced by blanks.
If, after formatting, the number of digit positions specified in the PICTURE character string do not fit into the receiving item, and there are excess digits in the sending item, digits are truncated on the left and an operating system escape message is issued.