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

Calling & Called programs


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sreedharp

New User


Joined: 20 Jul 2005
Posts: 2

PostPosted: Wed Jul 20, 2005 11:03 pm
Reply with quote

Hi,

I have a non db2 program calling a db2 program. Please let me know how to compile my main program and how to refer that in my JCL
Back to top
View user's profile Send private message
somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 134

PostPosted: Thu Jul 21, 2005 12:03 am
Reply with quote

You have to bind the subprogram (cobol-db2) and invoke the main program using IKJEFT01. Specify the plan name of the sub-program.

Code:

//SYSTSIN    DD *
  DSN SYSTEM(your dsn) 
  RUN PROGRAM(your main program) PLAN(plan name for sub-prog) -
  LIB('load library')   
/*


hth
-Som
Back to top
View user's profile Send private message
Sreedharp

New User


Joined: 20 Jul 2005
Posts: 2

PostPosted: Thu Jul 21, 2005 5:18 am
Reply with quote

Thanks for the information.

Do i need to compile the main program as db2 program i.e; precompile and bind or like a ordinary program
Back to top
View user's profile Send private message
notonly4u

New User


Joined: 26 Apr 2005
Posts: 87
Location: Hyderabad

PostPosted: Thu Jul 21, 2005 4:17 pm
Reply with quote

Dear sreedhar,

While you compile do yu use external bind?

If so then you have to bind for the sub program and it is enough if you do a precompile, Compile and linkedit the main program. You can't bind the main Non db2 program because there will not be any DBRM created for that program.

If yu have any queries.... Let me know. And also do correct me if Iam wrong somewhere....

Regards
Tanden
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Calling an Open C library function in... CICS 1
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
Search our Forums:


Back to Top