Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Compiling a mainprogram with a subprogram

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
kondakonda

New User


Joined: 20 Mar 2006
Posts: 34

PostPosted: Wed Jul 05, 2006 4:03 pm    Post subject: Re: Compiling a mainprogram with a subprogram
Reply with quote

Hi,

It depends on the static call or the dynamic call.

if you are using static call then the sub program should be compiled and the sub program load module should be link edited to the main program in link edit step through lked.syslib dd statement.

if you are using dynamic call then the subprogram should be compiled and keep the load module in the same pds as your main program load module.
Please let know this is clear or you need any more information.

Thanks.
Back to top
View user's profile Send private message

parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Wed Jul 05, 2006 4:33 pm    Post subject:
Reply with quote

Hi,

Compilation of the program remains same. It is the process of linking that resolves the external references ( like call to an external programs).

You need to spacify the load library of the calling program in the link step

e.g.
//SYSLIB DD DSNAME=YOUR.LOAD.LIB,DISP=SHR
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Thu Jul 06, 2006 11:02 am    Post subject:
Reply with quote

Hi,

While execution ( In your RUN jcl), both programs A and B needs to be present in STEPLIB/JOBLIB if your call is a dynamic call. Else, only program A needs to be present in the STEPLIB/JOBLIB.

Please check whether both the programs are present in the load libraries?

Thanks,
Parikshit
Back to top
View user's profile Send private message
kondakonda

New User


Joined: 20 Mar 2006
Posts: 34

PostPosted: Thu Jul 06, 2006 11:18 am    Post subject: Re: Compiling a mainprogram with a subprogram
Reply with quote

Hi,

Could you please confirm where you included the load module of the subprogram in the main program jcl

Whether included in the compile step or link edit step?

Because the subprogram load module should be included in the SYSLIB of the link edit step.

Thanks.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Compiling program in endeavor for tra... RALAKKAL Compuware & Other Tools 4 Mon Jun 05, 2017 8:27 pm
No new posts IDMS/DC-COBOL program - SNAP error wh... rakeshsekar1987 IDMS/ADSO 5 Tue Sep 13, 2016 8:28 pm
No new posts Problem Compiling cobol code with Cob... amitc23 COBOL Programming 2 Wed Aug 24, 2016 1:50 pm
No new posts Is possible to call subprogram from c... cmsmoon COBOL Programming 3 Fri Aug 05, 2016 6:46 pm
No new posts Compiler Option for compiling cobol p... Prerit Jain COBOL Programming 3 Wed Sep 09, 2015 5:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us