1.Syntax//[name] INCLUDE MEMBER=name [comments]
The INCLUDE statement consists of the characters // in columns 1 and 2 and four fields: name, operation (INCLUDE), keyword parameter (MEMBER), and
A name is optional on an INCLUDE statement. If used, code it as follows:
If you do not code a name, column 3 must be blank.
The operation field consists of the characters INCLUDE and must be preceded and followed by at least one blank. It can begin in any column.
The INCLUDE statement contains one keyword parameter:
Specifies the name of a member of a PDS or partitioned data set extended (PDSE) that contains the set of JCL statements (called an INCLUDE group) to be imbedded in the JCL stream.
The PDS or PDSE must be one of the following:
The comments field follows the parameter field after at least one intervening blank.
6.Location in the JCL
An INCLUDE statement:
7.Considerations for Using INCLUDE Groups
System and private libraries can contain both procedures and INCLUDE groups. The order in which the system searches system and private libraries for INCLUDE groups is the same as the search order used for procedures.
INCLUDE groups cannot contain the following JCL statements:JOB statements PROC and PEND statements JCLLIB statements JES2 and JES3 statements and commands DD * and DD DATA statements
Do not define procedures in an INCLUDE group. However, you can put EXEC statements that invoke procedures in an INCLUDE group.
You can use INCLUDE statements to imbed INCLUDE groups that contain DD and OUTPUT JCL statements, which allows you to use the same data set definitions for various jobs.
When the INCLUDE statement and the INCLUDE group contain symbolic
parameters, the system substitutes the values that are current at the time the symbolic parameter is encountered. Values assigned to symbolic parameters in an INCLUDE group (such as with the SET statement) are valid for use on subsequent JCL statements.
8.Examples of the INCLUDE Statement:
The following INCLUDE group is defined in member SYSOUT2 of private library CAMPBELL.SYSOUT.JCL.
The system executes the following program:
The JCLLIB statement specifies that the system is to search private library CAMPBELL.SYSOUT.JCL for the INCLUDE group SYSOUT2 before it searches any system libraries.
After the system processes the INCLUDE statement, the JCL stream appears as:
The system imbeds the INCLUDE group in the JCL stream (replacing the INCLUDE statement), and processes the included JCL statements with the JCL stream.
The following example shows the use of the SET statement to assign values to symbolic parameters in an INCLUDE group.
The following program is executed.
The SET statement, which is easy to change for different jobs, assigns values to the symbolic parameters in INCLUDE group SYSOUT2.
After the system processes the INCLUDE statement, it executes the JCL stream as:
The system imbeds the INCLUDE group in the JCL stream (replacing the INCLUDE statement), and assigns the values to the symbolic parameters in the INCLUDE group.
IBM-JCL Related Interview Questions
|VSAM Interview Questions||IBM - VSAM Interview Questions|
|IBM-CICS Interview Questions||JCL Interview Questions|
|IBM DB2 Interview Questions||COBOL Interview Questions|
|DB2 Using SQL Interview Questions||IBM-JCL&VSAM Interview Questions|
|IMS/DB Interview Questions||Mainframe DB2 Interview Questions|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.