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 a root job starts, paths are added to the PATH environment variable, and paths are also added to the PATH environment variable when a child job of such a root job starts. In this manner, the length of the value of the PATH environment variable increases. As a result, the maximum size of the PATH environment variable might be exceeded. When you use child jobs, make sure that the maximum size of the PATH environment variable will not be exceeded.
If the maximum size will be exceeded, separate the environment file for the root job from the environment file for the applicable child job and add paths to the PATH environment variable only in the environment file for 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 |