JCL JCLLIB

JCL JOBLIB JCL PROCLIB

Advertisements


JCLLIB Statement used mainly for:


  • To identify the names of the private libraries that the system uses for the job. Two major things that the system searches in the libraries for
    • Procedures on any EXEC statements.
    • Groups of JCL statements on any INCLUDE statements.
  • To identify the system and installation-defined procedure libraries that the system uses for the job.

JCLLIB identify the order in which the libraries are to be searched.

The system searches the libraries in the same order which specified on the JCLLIB statement.

The JCLLIB statement allows to code, use procedures and INCLUDE groups in private library.

The private library is in the place of system procedure libraries.

The usage of system procedure libraries is not mandatory.

Maximum one JCLLIB can be coded per one JOB.


Syntax:

//[name]  JCLLIB  [keyword-parameter]...  [comments]

The JCLLIB statement consists of the characters // in columns 1 and 2 as usual.

The other is name, operation (JCLLIB), keyword parameter (ORDER) and comments.

If only one library is listed in the search order, the parentheses are optional.

If the libraries are more than one then those needs to be coded in more than one line and the second line beginning in any column from 4 to 16.

JCLLIB is a JCL statement that allows the user to specify his own PROCLIBs and/or specify the order in which they're searched to find the PROCEDURES invoked in the JCL.

JCLLIB is a JCL keyword used for defining the Catalogued procedure.


name:


Name is optional on a JCLLIB statement.

If a name is not coded, column 3 must be blank.

If the name is coded, below are the rules.


Rules:

Name always begins in the column 3 and column 1 & 2 contains ‘//’.

name is 1 through 8 characters.

name is a combination of alphanumeric and national characters (@,# and $).

name first character should be alphabetic or national character.

name must be followed by one blank before DD.


Operation:


Operation field consists of JCLLIB characters.

Operation field can start in any column.

Operation field must be followed by one blank.


Parameters:


ORDER=(library[,library...])

Specifies the name of the libraries to be searched.

The maximum number of libraries that may be specified is 15.

User can specify private libraries, system and installation-defined procedure libraries.

The system searches the libraries in the order in how they specified.

The ORDER parameter can be specified only once.

Do not specify is a temporary data set (&&dsname).


PROCLIB=ddname

Specifies the ddname for the procedure library.

The system is to search for cataloged procedures called by EXEC statements in the job.

If the procedure library requested is not found, JES3 flushes the job before execution.


Comment:


Comment used to make a note of current statement.

Comment field follows parameter field.

Comment field should be preceded with a blank after the parameter field.


Example 1:

//MYLIBS   JCLLIB  ORDER=MTH.PROCLIB
//STEP01   EXEC    PROC=MTHPROC

The system searches the libraries for procedure MTHPROC in the following order:


  1. MTH.PROCLIB
  2. SYS1.PROCLIB

Example 2:

//MYLIBS   JCLLIB  ORDER=(MTH.PROCLIB1,MTH.PROCLIB2,
//            MTH.PROCLIB3)
//STEP01   EXEC    PROC=MTHPROC

The system searches the libraries for procedure MTHPROC in the following order:


  1. MTH.PROCLIB1
  2. MTH.PROCLIB2
  3. MTH.PROCLIB3
  4. SYS1.PROCLIB

Example 3:

//MYLIBS  JCLLIB  ORDER=(SYS1.PROCLIB,MTH.PROCLIB1)
//STEP01  EXEC    PROC=MTHPROC

The system searches the libraries for procedure MTHPROC in the following order:


  1. SYS1.PROCLIB
  2. MTH.PROCLIB1
  3. SYS1.PROCLIB (searched again the system default procedure library)

JCL JOBLIB JCL PROCLIB

Advertisements