JCLLIB Statement

Purpose

The JCLLIB statement identifies the libraries that the system will search for:

  • JCL members referenced in INCLUDE statements
  • Cataloged procedures referenced by EXEC statements

It allows you to specify search paths beyond the standard system procedure libraries.

Syntax

jcl
1
//[name] JCLLIB ORDER=(library-name[,library-name]...)

Key Parameters

  • name - An optional 1-8 character name that identifies the JCLLIB statement. Usually omitted.
  • ORDER=(library-name[,library-name]...) - Specifies the libraries to be searched in the order listed.

Examples

Basic JCLLIB Statement

jcl
1
// JCLLIB ORDER=(USER.PROCLIB,SYS1.PROCLIB)

Complete Example with INCLUDE

jcl
1
2
3
4
5
6
//MYJOB JOB (ACCT123),'JOHN SMITH' // JCLLIB ORDER=(USER.JCLLIB,PAYROLL.JCLLIB) //* // INCLUDE MEMBER=STDPARMS //* //STEP1 EXEC PGM=PAYROLL

Using JCLLIB with Procedures

jcl
1
2
3
4
5
6
//MYJOB JOB (ACCT123),'JOHN SMITH' // JCLLIB ORDER=(DEPT.PROCLIB,SYS1.PROCLIB) //* //STEP1 EXEC PAYPROC //* //STEP2 EXEC PGM=REPORT

Notes

  • The JCLLIB statement must appear after the JOB statement and before any EXEC or INCLUDE statements
  • Only one JCLLIB statement is allowed per job
  • Multiple libraries can be specified, up to 15 libraries
  • The libraries are searched in the order specified
  • If a member is not found in the libraries listed in the JCLLIB statement, the system will search the standard system procedure libraries
  • The JCLLIB statement applies to the entire job
  • Libraries specified must be partitioned data sets (PDS or PDSE)

Related Concepts

Related Pages