IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Compiling a mainprogram with a subprogram


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to go into a subprogram in IBM De... IBM Tools 5
No new posts Parallel Sysplex - subprogram execution CICS 7
No new posts Error when compiling a REXX exec with... CLIST & REXX 2
No new posts Compiling program in endeavor for tra... Compuware & Other Tools 4
No new posts IDMS/DC-COBOL program - SNAP error wh... IDMS/ADSO 5
Search our Forums:

Back to Top