Previous Topic: Pass Environment Variables in a UNIX JobNext Topic: Define Alternative Input and Output Sources


UNIX Environment Variables

When a UNIX job runs under a specific user account, the agent can pass the user's environment variables to the script or program. You can also set up a script's running environment by overriding the environment variables in the job definition. For example, you can override the HOME environment variable to run the script under a user’s login directory.

You can pass the following UNIX environment variables in a job definition to override the variable values:

HOME

Identifies the user's login directory. You can override the HOME value to set up a user-specific environment by specifying a different login directory in the job definition.

Example: HOME=/home/guest/bin

Notes:

PATH

Provides a list of directories that the shell searches when it needs to find a command. Each directory is separated by a colon. and the shell searches the directories in the order listed. The PATH variable is the most important environment variable. You can override the PATH value to set up a user-specific environment by specifying a different PATH in the job definition.

Note: Overriding the default system path can result in the "command not found" error.

ENV

Contains the name of the initialization file to run when a new Korn shell starts. You can override the ENV value to set up a user-specific environment by specifying a different ENV value in the job definition.

Example: ENV=/home/guest/bin/myenv

Note: The name of the file used to set up the script-running environment must be .profile. The .profile must be the same file used with the HOME variable.

PWD

Contains the absolute path name of your current directory.