7.2.2 export parameter
- Organization of this subsection
(1) Defining the export parameter
You can define export parameters in both the system environment file and the job environment file. For details about these files, see 2.6.1 Specifying the environment files.
If export parameters are specified in both the system environment file and the job environment file, they are handled as follows:
Because the environment files are also analyzed whenever a child job starts, the values specified in export parameters at the start of the child job are set in the environment variables again.
Both the system environment file specifications and the job environment file specifications are effective and these files are executed in this order.
- Example:
- System environment file
export A=s1 export B=s2 export A=s3
- Job environment file
export C=j1 export B=j2
- Order of execution
export A=s1 export B=s2 export A=s3 export C=j1 export B=j2
The following are examples of adding paths to the PATH environment variable:
export PATH='d:\user\prg;${PATH}' export PATH='/user/prg:${PATH}'
When adding a path to the PATH environment variable, the value may exceed the upper limit for specification in the environment variable. The value of the PATH environment variable becomes longer because the path is added when starting the root job and also added when starting the child job. For this reason, you must be careful so that the size of the PATH environment variable does not exceed the upper limit when being used together with a child job function. The upper limit of the character string length that can be stored in the environment variable is 32,766 bytes.
In Windows, when a long character string is stored in the PATH environment variable, an error may occur with the API of the OS even when the character string has not exceeded the upper limit. For this reason, refrain from storing a character string that is close to the upper limit.
If the character string exceeds the upper limit, separate the environment file of the root job and the environment file of the child job and add the path of PATH environment variable only to the environment file of the root job.
(2) List of export parameter
The following describes the export parameter definition conditions. Specification of this parameter is optional. Only the job controller uses this parameter.
Parameter name |
Definition |
Maximum number of times parameter can be specified |
---|---|---|
export |
Defines an environment variable that is to take effect when the job controller that uses the environment file is started. |
No limit |