Script Statement: Integrates a script into another script of the same object
:INC_SCRIPT (Script ID)
Syntax |
Description/Format |
---|---|
Script ID |
Number with which the script of an object is identified Allowed values: "0", "1" and "2" "0" - Includes the script (only in jobs and events) |
This script statement was implemented for internal reasons making it possible to call a script in the Header. Certain attributes can be set in this script which are then requested in the Header (e.g. another host). Special requirements of the z/OS JCL can be handled with this script.
This script statement can also be used "normally" in order to call a script within another script - even repeatedly. Both scripts must belong to the same object. Therefore, this script statement can only be used in jobs or events at this time. These objects have two tabs each for scripts.
For creating your script in modular, Automic recommends using the :INCLUDE script statement.
The "Pre Script" tab of a job contains a DIR command. The pre script is linked in the Script tab.
:INC_SCRIPT (1)
Afterwards, it can be seen in the job report that the DIR command was executed twice. The first time in the Header (defined in the Pre Script tab) and the second time between Header and Trailer (by the script statement in the Script tab).
See also:
Script element | Description |
---|---|
This integrates an Include object into a script |
Script Elements - Script Structure and Processing
About Scripts
Script Elements - Alphabetical Listing
Script-Elements - Ordered by Function