### Application Run-Time Environment Variables

Typically, your program queries the value of these operating system variables for the location of files used for command interpretation, run-time messages, and locale settings.

Some variables support locales:

- LANG
  To set a value for LANG, use the same format as in the setlocale function.
- LOCPATH
- Locale Category Environment Variables
- NLSPATH

Variables can specify the location of executable files and DLLs:

- DPATH
- LIBPATH
- PATH

Other variables have specific uses in your program:

- TEMPMEM
- TMP
- TZ

These variables support heap debugging:

- CPP_HEAP_STACK dictates the number of stack frames traced. The default setting is 10 stack frames.
- CPP_HEAP_SKIP dictates a pattern for heapchecking. For example, a setting such as CPP_HEAP_SKIP(100,5) directs the library heap management functions to start checking heaps after the 100th call, and to continue validating the heap every 5 calls thereafter.

Two environment variables support the ITRACE class, which provides run-time tracing for the Open Class Library:

- ICLUI_TRACE
  You can set ICLUI_TRACE to off, on, or noprefix. This last value means the trace is set on, but no prefix information is written to trace. The default setting is off.
- ICLUI_TRACETO
  You can set ICLUI_TRACETO to a standard error stream or to a queue. The default is queue.

If a required variable is not set properly, your program may not run as expected, may fail to find a file, or may find and use an unintended file.

Some application run-time environment variables do not affect programs linked to the IBM C and C++ Compilers subsystem run-time library.

Localization and Locales

Set Windows Run-Time Environment Variables
Set OS/2 Run-Time Environment Variables

Environment Variables for Debugging
LOCPATH Environment Variable
Locale Category Environment Variables
NLSPATH Environment Variable
DPATH OS/2 Environment Variable
LIBPATH OS/2 Environment Variable
PATH Environment Variable
TEMPMEM Environment Variable
TMP Environment Variable
TZ Environment Variable