:JCL_SUBSTITUTE
Script Statement: Replaces a string in the JCL with another string
Syntax
:JCL_SUBSTITUTE [Old String, New String]
Syntax |
Description/Format |
---|---|
Old String |
String to be replaced |
New String |
String to replace the Old String |
This script statement replaces any string in the JCL (Job Control Language) during the generation of a job. The number of characters in the Old String and the New String can vary. It is also possible to replace a single character.
This script statement is used, for example, to handle special requirements of the z/OS JCL. The character "&" is required there. Because this character is used for definitions of script variables in AE, problems can occur.
The specified strings are replaced just after the line with the script statement. They are replaced up to the line of the script in which the script statement is recalled with or without parameters.
Example
In the example, the character "$" is replaced with the character "&".
:JCL_SUBSTITUTE "$", "&"
REPORTS=($REP)
SORT=TIME
:JCL_SUBSTITUTE
RANGE=$RAN
The generated job then contains the following lines:
REPORTS=(&REP)
SORT=TIME
RANGE=$RAN
See also: