LOCALE (load environment file)

Top  Previous  Next

 

 

LOCALE(

| file| )

 

 

 

| setting, value |

 

LOCALE

Allows the user to load a specific environment file (.ENV) at run-time and also to set individual environment settings.

file

A string constant or variable containing the name (including extension) of the environment file (.ENV) to load, or the keyword WINDOWS. This may be a fully-qualified DOS pathname.

setting

A string constant or variable containing the name of the environment variable to set. Valid choices are listed under the Environment Files section.

value

A string constant or variable containing the environment variable setting.

The LOCALE procedure allows the user to load a specific environment file (.ENV) at run-time and also to set individual environment settings. This allows an application to load another file to override the default appname.ENV file, or to specify individual environment file settings when no environment file exists.

The WINDOWS keyword as the file parameter specifies use of Windows' default values for CLACOLSEQ, CLACASE and CLAAMPM. When specifying individual settings, the value parameter does not require double quotes around each individual item in the value string, unlike the syntax required in an .ENV file.

Errors Posted:

02

File Not Found

05

Access Denied

Example:

LOCALE('MY.ENV')                       !Load an environment file

LOCALE('WINDOWS')                      !Set default CLACOLSEQ, CLACASE and CLAAMPM

LOCALE('CLABUTTON','OK,&Si,&No,&Abortar,&Ignora,&Volveratratar,Cancelar,&Ayuda')

                                      !Set CLABUTTON to Spanish

LOCALE('CLACOLSEQ',|

'AÄÅÆaàáâäåæBbCÇcçDdEÉeèéêëFfGgHhIiìíîïJjKkLlMmNÑnñOÖoòóôöPpQqRrSsßTtUÜuùúûüVvWwXxYyZzÿ')

                                      !Set the collating sequence

LOCALE('CLACASE','ÄÅÆÇÉÑÖÜ,äåæçéñòü')  !Set upper/lower case pairs

LOCALE('CLAMSG2','No File Found')      !Set ERROR() message for ERRORCODE()=2

 

See Also:

Environment Files

OEM