4 2 2 Set up default x_run parameters

Install LANSA on Linux

4.2.2 Set up default x_run parameters

Although most x_run parameters are automatically received from the Client, it is often easier if standard parameters can be configured in one place. For example, a specific directory for RPTH=, or a DBID= setting for each partition.

An overview of the facilities LANSA provides to set the defaults is given below, but please refer to Permanently Specifying X_RUN Parameters in the Technical Reference Guide for details.

x_lansa.pro

The x_lansa.pro file allows default x_run parameters to be specified at the partition level.

You can also use an x_lansa.pro file to specify default x_run parameters for the whole LANSA installation. The system level x_lansa.pro file is created in the $LANSAXROOT/x_lansa directory.

X_RUN environment variable

The X_RUN environment variable allows default x_run parameters to be specified for LANSA sessions, i.e. incoming client requests or x_run executed from the command line.

For incoming client requests to inherit the X_RUN environment variable changes, the X_RUN environment variable must be changed in the root user's command shell and the listener has to be stopped and restarted in the same command shell.

If you need to change the X_RUN environment variable, you should always change it after calling the uservar.sh script which sets it to "ROOT: $LANSAXROOT". Use the following method to append default parameters to the X_RUN variable:

X_RUN="$X_RUN ...."; export X_RUN

(Replace .... by the appropriate parameters.)

Precedence for default X_RUN parameters

If the same x_run parameter (e.g. DBID=) was specified on the incoming client request, in the X_RUN environment variable, in the system level x_lansa.pro and the partition level x_lansa.pro, which setting would be used?

Order of precedence for incoming client requests:

1.  Parameters in the client request.

2.  The X_RUN environment variable (inherited from the root user when the listener was started).

3.  The partition level x_lansa.pro file.

4.  The system level x_lansa.pro file

Order of precedence for command line execution of x_run:

1.  Parameters on the command line.

2.  The X_RUN environment variable (in the current shell when x_run is called).

3.  The partition level x_lansa.pro file.

4.  The system level x_lansa.pro file.