Automation Engine Script Guide > Ordered by Function > Script Structure and Processing > :JCL_SUBSTITUTE

: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
Format: script literal or script variable

New String

String to replace the Old String
Format: scriptA particular Automation Engine object type. literal or script variableA placeholder for a value within a script.

Comments

This script statement replaces any string in the JCL (Job Control LanguageShort form of "Job Control Language". It refers to applications that are processing steps executed on computers.) during the generation of a jobAn Automation Engine object type for a process that runs on a target system.. 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:

Script element Description

:JCL_CONCAT_CHAR

Forms JCL lines to a size of up to 2 KB

Script Elements - Script Structure and Processing

About Scripts
Script Elements - Alphabetical Listing

Script-Elements - Ordered by Function

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH