U@GETRPTLOC

U@GETRPTLOC 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 U@GETRPTLOC routine can only be used in batch report programs

The U@GETRPTLOC 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.

Module LOCALERTNS
Input No input required.

Output Fields

Field Type and length Definition
E@RPLANGUAGE A 10 The language or dialect specified in the locale definition.
E@RPDATESEP A 1

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

The default is the forward slash (/).

E@RPTIMESEP A 1 The character used to separate seconds, minutes, and hours in a time value. The default is the colon (:).
E@RPDATEDSPFM A 6

Indicates the date format:

MMDDYY DDMMYY YYMMDD

The default is MMDDYY.

E@RPTIMEFMT A 1

Indicates the time format:

1 = 12 hour

2 = 24 hour

The default is 1.

E@RP1000SEP A 1

The character used to delimit thousands in a number.

The default is the comma (,).

E@RPDECSEP A 1

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

The default is the period (.).

E@RPPCTSIGN A 1

The character used to indicate percentages.

The default is the percent sign (%).

E@RPCURSYM A 1

The character used for currency values.

The default is the dollar sign ($).

E@RPCURSYMLOC 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.

E@RPDECSGNLOC 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


     CALLP     U@GETRPTLOC                Get Report Locale 
     IF        VHRFNF1@DT8FLD <> *ZEROS              
     EVAL      VHRFNWS@DATEIN  = VHRFNF1@DT8FLD            
     IF        E@RPDATEDSPFM   = 'MMDDYY'                 
                                                         
     CALLP     U@STR@INIT(%ADDR(E@STR@DS):               
               %ADDR(VHRFNF1@VALUE): 1:                   
               %SIZE(VHRFNF1@VALUE): 1)                   
     MOVEL     VHRFNWS@MM      T@1@2            2