Page 1 of 1

What is the difference between INCLUDE and JCLLIB?

Posted: Mon Jun 10, 2013 10:25 am
by Angel
What is the difference between INCLUDE and JCLLIB? Are not they just same?

Re: What is the difference between INCLUDE and JCLLIB?

Posted: Mon Jun 10, 2013 8:02 pm
by Anuj Dhawan
There are not enough post in the Forum yet to search, however, this is pretty straight forward question. Have you tried with manuals?

I'll try to come back with some answer if you don't get it.

Good Luck!

Re: What is the difference between INCLUDE and JCLLIB?

Posted: Sun Jun 30, 2013 5:59 pm
by Anuj Dhawan
In simple words - an INCLUDE in JCL is analogous to a COPYBOOK in a in COBOL. It allows you to write "lines of repetitive code" once and use it many times and in many places throughout your JCL.

JCLLIB is analogous to a JOBLIB. Instead of pointing to an alternative load library that remains active for the length of the JOB, a JCLLIB statement points to a JCL library to be used for the length of the JOB. All cataloged procedures referenced in a JOB are searched for in the JOB's JCLLIB. If a JCLLIB isn't provided, the default JCL library is searched.

Personally I've used

Code: Select all

// JCLLIB ORDER=PDS.NAME
so many times to test PROCs before they're moved to production.

Re: What is the difference between INCLUDE and JCLLIB?

Posted: Tue Jul 23, 2013 12:27 pm
by Angel
Thanks Anuj.

Re: What is the difference between INCLUDE and JCLLIB?

Posted: Tue Jul 23, 2013 3:42 pm
by Anuj Dhawan
You're welcome.

Re: What is the difference between INCLUDE and JCLLIB?

Posted: Tue Jul 23, 2013 7:39 pm
by Robert Sample
If a JCLLIB isn't provided, the default JCL library is searched.
The default JCL library sequence is defined in JES (JES2 or JES3) and the best source of information about the libraries included would be the site support group since each site may (almoist certainly) have different libraries listed.