What is the difference between INCLUDE and JCLLIB?

JES2/3, JCL, utilities.
Post Reply
User avatar
Angel
Registered Member
Posts: 93
Joined: Sat Jun 08, 2013 8:13 pm

What is the difference between INCLUDE and JCLLIB?

Post by Angel »

What is the difference between INCLUDE and JCLLIB? Are not they just same?
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: What is the difference between INCLUDE and JCLLIB?

Post 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!
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: What is the difference between INCLUDE and JCLLIB?

Post 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.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Angel
Registered Member
Posts: 93
Joined: Sat Jun 08, 2013 8:13 pm

Re: What is the difference between INCLUDE and JCLLIB?

Post by Angel »

Thanks Anuj.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: What is the difference between INCLUDE and JCLLIB?

Post by Anuj Dhawan »

You're welcome.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: What is the difference between INCLUDE and JCLLIB?

Post 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.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”