1.4.2 Environment variables set when a job is executed from JP1/AJS3
The following table shows the environment variables that are set when a job is executed.
- Notes
-
-
The environment variables listed in Table 1-7 cannot be used as environment variables for job definition. They cannot be used within any file specified as an environment file either.
-
For AIX, the information for /etc/environment is not inherited.
-
Do not use any environment variable starting with JP1, AJS, or AJS2 (case-insensitive).
-
The TZ environment variable is not set during job execution.
-
Environment variables beginning with AJS are set only when a job is registered from a jobnet. They are not set in a submit job.
-
- #1
-
- In UNIX:
-
-
When you specify JP1/AJS3 as the execution target service in the detailed definition of a job
The logical host name specified in the -h option of the jajs_spmd command is set.
If you omit the -h option, and the value of the JP1_HOSTNAME environment variable has been set, that value is passed as the logical host. Nothing is set for a physical host.
-
When you specify JP1/AJS3 Queueless Agent as the execution target service in the detailed definition of a job
If the host that executes the job is a logical host, the value specified as the execution agent in the detailed definition of the job is set. Nothing is set when the host that executes the job is a physical host.
-
- In Windows:
-
-
When you specify JP1/AJS3 as the execution target service in the detailed definition of a job
For a logical host, the logical host name is set in the JP1_HOSTNAME environment variable at the startup of the JP1/AJS3 service. Nothing is set for a physical host.
-
When you specify JP1/AJS3 Queueless Agent as the execution target service in the detailed definition of a job
If the host that executes the job is a logical host, the value specified as the execution agent in the detailed definition of the job is set. Nothing is set when the host that executes the job is a physical host.
-
- #2
-
If a shell is specified on the first line of the script file specified in Script file name when a command statement is also specified in Command statement, the specification of the shell has no effect.
- #3
-
When a job is started from JP1/AJS3, JP1/AJS3 will explicitly set the /bin:/usr/bin value in the PATH environment variable. If you want to set any other value, you must set the value in a definition of the command or script file specified when the job was defined, or a definition in the local login script.
- #4
-
If JP1/AJS3 Queueless Agent is specified as the execution target service, the environment variable value that is used when the queueless agent service starts is set.
Usually, environment variables are set in JP1/AJS3. Those variables include those listed in Table 1-7, as well as those specified for job definition, and those contained in files specified as environment files for job definition. In addition, environment variables may also be set in the command statements, script files, local login scripts, and system login scripts specified for job definition. For environment variables like TZ that are not set during job execution, set them as one of the options below. If the same environment variables are found in these, they will be valid according to the following levels of priority (with the value of 1 as the highest level).
-
In Windows:
-
Environment variables specified for Environment variables#1.
-
Environment variables specified for Environment file#2.
-
System environment variables
-
-
In UNIX:
-
Definitions in the commands or script files specified for job definition
-
Definitions contained in local login scripts
-
Definitions contained in system login scripts
-
Environment variables specified for Environment variables#1.
-
Environment variables specified for Environment file#2.
-
Environment variables used when the queueless agent service starts#3.
- #1
-
Variables specified for Environment variables in the JP1/AJS3 - View window or those specified with the -env option for the jpqjobsub command.
- #2
-
Variable files specified for Environment file in the JP1/AJS3 - View window or those specified with the -ev option for the jpqjobsub command.
- #3
-
Applies only when JP1/AJS3 Queueless Agent is specified as the execution target service.
-
- Cautionary note
-
In Windows, JP1/AJS3 services normally start with the system environment variables as the settings. User environment variables are not read. Job execution is also governed by these system environment variables. However, when the system is configured as a cluster system with logical hosts, the MSCS# reads the user environment variables at system startup. The user environment variables take effect in the JP1/AJS3 services started by the MSCS on the logical hosts, and are also used at job execution.
In addition to the system environment variables, the environment variables set at OS startup are also read when JP1/AJS3 services are activated.
- #
-
Windows Server Failover Clustering (WSFC) in Windows Server 2012 or Windows Server 2008. For clustering software other than MSCS and WSFC, see the software specifications.