4 1 3 Prepare for executing x_run batch jobs

Install LANSA on Linux

4.1.3 Prepare for executing x_run batch jobs

If the user needs to execute x_run from the command line, use the following instructions:

First, ensure you have followed the guidelines in 4.1.2 Add a new Linux User Id.

LANSA provides a script, setenv.sh, that sets up the environment variables required for command line LANSA operations using the standard shell 'sh' or 'bash'. If you use other shell, e.g. csh, you will need to create you own script based on setenv.sh. This script must be loaded in a shell prompt (only once is required for the whole live time of the shell prompt) using the shell dot '.' command before running any LANSA command line in the same shell prompt.

For example, assuming you are using the standard shell 'bash' for Red Hat Enterprise Linux, the command line to load the script looks like:

. /lansa/x_lansa/bin/setenv.sh

 

Notice the space between the first dot and the following slash is part of the command line and cannot be omitted.

Alternatively, you may set the LANSAXROOT environment variable first:

LANSAXROOT=/lansa; export LANSAXROOT

. $LANSAXROOT/x_lansa/bin/setenv.sh

 

If any errors are found during the script's execution, error messages will be issued and the scripts return code will be non-zero.

Optionally, you can change the user's login script to load setenv.sh whenever a shell prompt is started. That would be handy if you use LANSA command line frequently.