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?
 
giltjrCommented:
project/group/type are used to make up a dataset name (a.k.a a file name) like:

PAYROLL.ACCT.PROD.LOADLIB
PAYROLL.ACCT.PROD.SOURCE

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:

//JOBLIB DD DISP=SHR,DSN=PAYROLL.ACCT.PROD.LOADLIB

or

//STEPLIB DD DISP=SHR,DSN=PAYROLL.ACCT.PROD.LOADLIB


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.
0
 
garypfirstechCommented:
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 (http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3pg50/CCONTENTS?SHELF=EZ2ZBK0K&DN=SC23-8529-01&DT=20090820210412) in chapter 4.1
0
 
giltjrCommented:
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.
0
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:
Good.

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)
0
 
garypfirstechCommented:
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. (http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/iea2b560/CCONTENTS?SHELF=EZ2ZBK0K&DN=SA22-7598-06&DT=20100701093058)

For information on specifying the dataset for a static call, please see the Program Management User's Guide and reference (http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/iea2b1a0/CCONTENTS?SHELF=EZ2ZBK0K&DN=SA22-7643-10&DT=20100701093421) section 4.2 and the INCLUDE statement discussion.
0
 
Eduardo FuerteAuthor Commented:
Now it's up to me to deep the knowledge.
0
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.