Linking a program that calls another

This forum provides the support of Dezhi Mainframe systems. Please post your questions about logon, usage of our mainframe environment.

Moderators: sysprog, prino, sfan, steve-myers, Tim001

Linking a program that calls another

Postby michel123 » Sat 31 Jul 2010, 10:46

hello,

What are the parameters to be used for linking two programs between them?
I have a program p1 which calls a second program sp2 to retrieve the current date and I use the following parameters in the SYSIN L. procedure ASMACL:

INCLUDE SP2
NAME P1 (R)


Thanks.

Michel.
michel123
 
Posts: 79
Joined: Thu 22 Jul 2010, 16:21

Re: Linking a program that calls another

Postby prino » Sat 31 Jul 2010, 11:53

Code: Select all
 INCLUDE P1
 INCLUDE SP2
 NAME P1 (R)
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
Some programming here :mrgreen:
prino
 
Posts: 479
Joined: Sat 06 Jun 2009, 21:41
Location: Vilnius, Lithuania

Re: Linking a program that calls another

Postby michel123 » Sat 31 Jul 2010, 14:23

Prino thank you, it works!


Michel.
michel123
 
Posts: 79
Joined: Thu 22 Jul 2010, 16:21

Re: Linking a program that calls another

Postby steve-myers » Sat 31 Jul 2010, 19:09

The INCLUDE statements will work fine, though you have to have the corresponding DD statements in your JCL. There are alternatives --
Code: Select all
//L.SYSIN DD DISP=SHR,DSN=data-set-name-of-object-for-program1
// DD DISP=SHR,DSN=data-set-name-of-object-for-program2
// DD *
 more Binder control statements
You can also place the object decks into a PDS, possibly with alias names that conform to external entry names, and specify the PDS using
Code: Select all
//L.SYSLIB DD DISP=SHR,DSN=name-of-PDS-library
A final possibility is to link the object decks into a PDS using the NCAL option so no external libraries are searched specifying member and alias names as for my second example, and then specify the PDS as a SYSLIB. In the long run you may find the SYSLIB idea more convenient than having a lot of DD statements, though if your ultimate goal is to prepare you system for external distribution for installation through SMP you'll find
Code: Select all
 INCLUDE ddname(member)
more convenient than using SYSLIB.
steve-myers
 
Posts: 452
Joined: Tue 04 May 2010, 15:43

Re: Linking a program that calls another

Postby michel123 » Sun 01 Aug 2010, 10:52

Hello,

Steve thank you for this information. I will have to study more about my knowledge.
Is there a doc, relatively easy to study, to address these issues there?

Michel
michel123
 
Posts: 79
Joined: Thu 22 Jul 2010, 16:21

Re: Linking a program that calls another

Postby steve-myers » Sun 01 Aug 2010, 12:06

I don't know any real user guides for using the Binder. The reference manual, though it's not an easy read, is not all that bad for an IBM manual is http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B140/CCONTENTS?SHELF=IEA2BK51&DN=SA22-7643-03&DT=20040709091949. The basic JCL and control statements change very slowly. You have to realize I've been using the old Linkage Editor and the much newer (and faster) Binder for more than 40 years, so my idea of "easy, or "bad" is suspect. Most 40 year old JCL and control statements still work, so this stuff changes slowly! If you run into ideas you don't understand post something here and someone should be able to help you.
steve-myers
 
Posts: 452
Joined: Tue 04 May 2010, 15:43

Re: Linking a program that calls another

Postby michel123 » Sun 01 Aug 2010, 13:25

Thank you for your help and advice, Steve.

Michel.
michel123
 
Posts: 79
Joined: Thu 22 Jul 2010, 16:21


Return to Dezhi systems: Mainframe

Who is online

Users browsing this forum: No registered users and 0 guests