Configuration Methods - Environment Variables

Environment Variables

Environment variables, like command line options, allow options to be specified for one instance of a program execution. Each time that you execute a program, environment variables allow you to tailor the behavior of the program to meet the specific needs for that execution.

Environment variables are the third to highest in the precedence order, after command file options (see Configuration Methods).

Each operating system has its own unique method of setting environment variables.

All environment variables used by Universal Agent are upper case and are prefixed with a product identifier consisting of three or four characters. The product sections specify the value of the environment variables. Values are case-sensitive.


z/OS

Environment variables in z/OS are specified in the JCL EXEC statement PARM keyword. Environment variables are part of the IBM Language Environment (LE) and as such are specified as LE runtime options. The PARM value is divided into LE options and application options by a slash ( / ) character. Options to the left of the slash are LE options and options to the right are application options.
 
Example of setting an environment variable (set option UCMDLEVEL to a value of INFO):
 

PARM='ENVAR("UCMDLEVEL=INFO")/'

UNIX

Environment variables in UNIX are defined as part of the shell environment. As such, shell commands are used to set environment variables. The environment variable must be exported to be used be a called program.
 
Example of setting an environment variable (set option UCMDLEVEL to a value of INFO in a bourne, bash, or korn shell):
 

UCMDLEVEL=INFO
export UCMDLEVEL

Windows

Environment variables in Windows are defined as part of the Windows console command environment. As such, console commands are used to set environment variables.
 
Example of setting an environment variable (set option UCMDLEVEL to a value of INFO):
 

SET UCMDLEVEL=INFO

IBM i

Environment variables in IBM i are defined with Command Language (CL) commands for the current job environment.
 
Example of setting an environment variable (set option UCMDLEVEL to a value of INFO):
 

ADDENVVAR ENVVAR(UCMDLEVEL) VALUE(INFO)