?
Solved

How to configure program locations to use Cobol - CALL ?

Posted on 2011-05-09
6
Medium Priority
?
785 Views
Last Modified: 2012-08-14
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...
0
Comment
Question by:Eduardo Fuerte
  • 2
  • 2
  • 2
6 Comments
 
LVL 7

Expert Comment

by:garypfirstech
ID: 35724336
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
 
LVL 57

Expert Comment

by:giltjr
ID: 35725701
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
 

Author Comment

by:Eduardo Fuerte
ID: 35732333
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 57

Accepted Solution

by:
giltjr earned 1000 total points
ID: 35732433
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
 
LVL 7

Assisted Solution

by:garypfirstech
garypfirstech earned 1000 total points
ID: 35732897
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
 

Author Closing Comment

by:Eduardo Fuerte
ID: 35754462
Now it's up to me to deep the knowledge.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Last month Marc Laliberte, WatchGuard’s Senior Threat Analyst, contributed reviewed the three major email authentication anti-phishing technology standards: SPF, DKIM, and DMARC. Learn more in part 2 of the series originally posted in Cyber Defense …
Integration Management Part 2
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month16 days, 3 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question