How to configure program locations to use Cobol - CALL ?

Hi Experts

Some days ago I've asked about compilation and linkedition of mainframe cobol code.
I have a doubt about the CALL command, since it could call programs inside other locations

My doubt is : could a program call another program at other libraries ?
If so, how to configure it ?

According to:
Library :   built around the concept of a three tier  layout to a dataset / file name
project - The catalogue High level prefix under which the dataset is stored.
group - The basic name identifier of the dataset
type - a third level indicating the type of data being stored
Member - for a PDS(e) Partitioned Dataset the name of the element actually containing the Data...
Eduardo FuerteAsked:
Who is Participating?
project/group/type are used to make up a dataset name (a.k.a a file name) like:


A member is within one fo these files.  You can't point to a member, you point to the dataset.

In JCL you can either code a JOBLIB or a STEPLIB and it would look something like:




Then whenever you CALL a program the system will look for that program in the file PAYROLL.ACCT.PROD.LOADLIB.

You can't control LINKLST, this is control by the system programmers and no offense, but I hope your not one of tye sysprogs.
There are two types of CALL implementations in COBOL: a dynamic call and a static call.  In a dynamic call, the called routine is located at runtime.  In general, this is done via the linklist, JOBLIB, or STEPLIB.  For a static call, the called routine is located at binder (or linkedit) time and the called module is located via a SYSLIB or INCUDE card specifying another library.

You can find details on both of these situations in the COBOLProgramming Guide ( in chapter 4.1
garypfirstech is correct.  

If you are familure with how distributed systems work you can think of linklst, JOBLIB, STEPLIB, as the PATH varible, or in Java as the CLASSPATH variable.
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Eduardo FuerteAuthor Commented:

But in therms of

Library/ project/ group / type Member -
for a PDS(e) Partitioned Dataset the name of the element actually containing the Data

How must be this cards configurated - using the directives you've pointed ?
(since I'm in the correct way)
giltjr has provided the information for a dynamic call.  The name supplied in your COBOL program is used as the name of a member or alias in the PDSes or PDSEs associated with your JOBLIB or STEPLIB DD statements.  The order of searching for dynamically called programs is explained in more detail in section 2.6.1 of the JCL user's guide. (

For information on specifying the dataset for a static call, please see the Program Management User's Guide and reference ( section 4.2 and the INCLUDE statement discussion.
Eduardo FuerteAuthor Commented:
Now it's up to me to deep the knowledge.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.