:INC_SCRIPT

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

Syntax

:INC_SCRIPT (Script ID)

Syntax

Description/Format

Script ID

Number that identifies the script to call
Format: Number without quotations

Allowed values:

  • 0
    (Job objects) Script from the Process page
    (Event objects) Script from the !Process/Event Process page
  • 1
    (Job objects) Script from the Pre-process page
    (Event objects, on the !Process/Event Process page) Script from the Process page
  • 2
    (Job objects only) Script from the Post-process page

Comments

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.

Example

The Pre Process page of a job contains a DIR command. The following script on the Process page calls the script on the Pre Process page:

:INC_SCRIPT (1)

After execution, the job report shows that the DIR command was executed twice: first in the Header (defined on the Pre Process page), and then between the Header and Trailer (by the script on the Process page).

See also:

Script element Description

:INCLUDE

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