7.3.11 CMDSUB_PROCESS parameter (defines the execution process of command substitution) [only for Windows]
Syntax
#-adsh_conf CMDSUB_PROCESS {CURRENT | OTHER}
Description
This command defines the execution process of command substitution.
Although the content of the variable is updated with command substitution, specify OTHER when reusing the contents from before execution of command substitution after finishing command substitution.
An example of when OTHER is specified is as follows.(Assume that CBL_SYSUT is the variable for the common interface of CBLUAPx.)
-
Contents of the job definition script
funcA(){ CBL_SYSUT=/file2 CBLUAP2 } CBL_SYSUT=/file1 VAL1=$(CBLUAP1) VAL2=$(funcA) VAL3=$(CBLUAP3)
In this case, /file1 is stored in the shell variable CBL_SYSUT when executing CBLUAP1 and CBLUAP3, and /file2 is stored in the shell variable CBL_SYSUT when executing CBLUAP2.
Operands
- CURRENT
-
When specifying the following command for command substitution, command substitution is executed with the current process.
-
Standard shell commands
-
Substitution expression
-
Script control statement
-
Extended shell command
-
Reserved script command
-
Function
In cases other than above, the command operates with a different process. In addition, a temporary file is used for exchanging data.
-
- OTHER
-
This command operates the command substitution with a different process.
Notes
-
If you define this parameter for both the system environment file and job environment file, the definition of the job environment file is enabled.
-
If you define this parameter for the same host in the environment file multiple times, a parameter error will occur.
-
If you specify OTHER, the execution time when specifying OTHER may be longer than when specifying CURRENT. Therefore, you must verify the execution time of a job when switching from CURRENT to OTHER. Some script development parts and UNIX-compatible commands in the script format use command substitution in the script. We recommend specifying CURRENT to prevent lengthening of the execution time when executing script development parts and UNIX-compatible commands in the script format.
-
If a command for which all of the following conditions overlap is described, the result of command substitution may not be obtained correctly.
-
CURRENT is specified for the CMDSUB_PROCESS parameter.
-
A pipe is being used during the command substitution process.
-
The last command linked with the pipe is being executed in the background.
Example: `cmd1 | { cmd2; cmd3 & }`
-