A.1 Notes on defining environment variables
This section describes the notes on defining environment variables for job execution.
For a list of environment variables, see the environment variable list in 1.4 Environment variables.
-
Use the environment-variable-name=value format to specify an environment variable. To specify more than one environment variable, use a line-feed character to separate each entry, as shown in the following example.
- Example:
-
environment-variable-name-1=ABCD<line-feed character>
environment-variable-name-2=EFGH<line-feed character>
You can separate each entry only by using a line-feed character. Do not use a delimiter such as a semicolon (;) or a colon (:).
-
Make sure that you specify all entries in the environment-variable-name=value format. If you specify an entry that is not in this format, the job could terminate abnormally depending on the OS of the host on which the job is executed.
-
You cannot use environment variables that start with AJS (for example, AJSxxxx, where xxxx is any string) regardless of whether you specify them in uppercase or lowercase. These variables are reserved in the system.
-
You cannot use environment variables that start with JP1 (for example, JP1xxxx, where xxxx is any string) regardless of whether you specify them in uppercase or lowercase. These variables are reserved in the system.
-
You cannot set the environment variables (those shown in Table 1-7 in 1.4 Environment variables) that are set when a job is executed for environment variables of a job definition or in a file you specify for environment file of a job definition.
-
Usually, environment variables are set in JP1/AJS3 and they refer to those listed in Table 1-7 in 1.4 Environment variables, 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. If the same environment variables are found in these, they will have the following levels of priority (with the value of 1 as the highest level).
- Windows
-
1. Environment variables specified for Environment variables#1
2. Environment variables specified for Environment file#2
3. System environment variables
- UNIX
-
1. Definitions in the commands or script files specified for job definition
2. Definitions contained in local login scripts
3. Definitions contained in system login scripts
4. Environment variables specified for Environment variables#1
5. Environment variables specified for Environment file#2
6. Environment variables set 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
-
Variables specified for Environment file in the JP1/AJS3 - View window or those specified with the -ev option for the jpqjobsub command.
- #3
-
Applicable only when the service to be executed is for Queueless Agent jobs.
-
When defining an environment variable in a dialog box of JP1/AJS3 - View or in the -env option of the jpqjobsub command, you cannot use a reference to an environment variable. In the following example, the xyz variable is assigned the character string %abc%, and not the value of the abc environment variable.
- Example:
-
abc=1
xyz=%abc%
If you want to use a reference to an environment variable, specify the reference in the batch file or script file for the job to be executed.
- 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 Failover Clustering# reads the user environment variables at system startup. The user environment variables take effect in the JP1/AJS3 services started by the Failover Clustering 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.
- #
-
For clustering software other than Failover Clustering, see the software specifications.