900-GET-REPORT-LOCALE

900-GET-REPORT-LOCALE allows a developer to retrieve a locale definition for a batch report. Retrieving a locale definition ensures that the information in a batch report has the expected formatting and punctuation for the locale in effect at a particular time. Examples include formatting for date, time, and decimal numbers.

Use this routine when a batch report has rule-based translation enabled. Rule-based translation is used to change locales while the report is running based on the locale preference of a vendor, customer, and so on.

Note: The 900-GET-REPORT-LOCALE routine can only be used in batch report programs

The 900-GET-REPORT-LOCALE routine requires no fields as input. Calling the routine adds the working storage for the report locale to the program. As a result, the program contains the working storage for both the report locale and the user locale.

Library LOCALERTNS
Input No input required.

Output Fields

Field Type and length Definition
RPT-LANGUAGE A 10 The language or dialect specified in the locale definition.
RPT-DATE-SEPARATOR A 1

The character used to separate day, month, and year in a date value.

The default is the forward slash (/).

RPT-TIME-SEPARATOR A 1 The character used to separate seconds, minutes, and hours in a time value. The default is the colon (:).
RPT-DATE-DISPLAY-FORMAT A 6

Indicates the date format:

MMDDYY DDMMYY YYMMDD

The default is MMDDYY.

RPT-TIME-FORMAT A 1

Indicates the time format:

1 = 12 hour

2 = 24 hour

The default is 1.

RPT-THOUSANDS-SEPARATOR A 1

The character used to delimit thousands in a number.

The default is the comma (,).

RPT-DECIMAL-SEPARATOR A 1

The character used to separate whole numbers from fractions in currency values.

The default is the period (.).

RPT-PERCENT-SIGN A 1

The character used to indicate percentages.

The default is the percent sign (%).

RPT-CURRENCY-SYMBOL A 1

The character used for currency values.

The default is the dollar sign ($).

RPT-CURRENCY-SYMBOL-LOC A 1

Indicates the placement of the currency symbol.

P = Prefix (currency symbol to the left of the value)

S = Suffix (currency symbol to the right of the value)

The default is P.

DECIMAL-SIGN-LOC A 1

Indicates the placement of the negative sign (-).

P = Prefix (negative sign to the left of the value)

S = Suffix (negative sign to the right of the value)

The default is P.

Programming Example

     PERFORM 900-GET-REPORT-LOCALE.
     IF (HRFNF1-DATE-8-FIELD NOT = ZEROS)
         MOVE HRFNF1-DATE-8-FIELD TO HRFNWS-DATE-IN
         IF (RPT-DATE-DISPLAY-FORMAT = "MMDDYY")
             STRING HRFNWS-MM HRFNWS-DD HRFNWS-CC HRFNWS-YY
                                 DELIMITED BY SIZE
                                 INTO HRFNF1-VALUE
         END-IF