:INC_SCRIPT

Use the :INC_SCRIPT statement to call a script from a Process page on another Process page within the same object.

This script statement was originally implemented to let you call a script in the header, for example to handle special z/OS requirements with Job Control Language (JCL). In that context, the script sets attributes which are requested in the Header, such as another host. However, you can use this script statement more generally when you want to call a script on one Process page from another, even repeatedly.

Tip: You can call an Include object from another object if you want to insert script lines from the Include object. For more information, see :INCLUDE.

Syntax

:INC_SCRIPT (Script ID)

Parameters

Note: You can only use the :INC_SCRIPT statement in object types that have more than one Process page (Job and Event objects).

Example

A Job contains a script on the Pre-process page that includes a DIR command. The following script statement on the Process page of the same Job calls the script from the Pre-process page.

:INC_SCRIPT (1)

After the Job executes, the job report shows that the DIR command executes twice: first in the Header (as defined in the script on the Pre-process page), and then between the Header and Trailer (as called by the script statement on the Process page).

See also:

seealso

Reusing Script Components