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

COBOL-DB2 BIND and execute problem


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Mon Nov 20, 2006 1:08 pm
Reply with quote

Hi Guys,

Here's my problem

I am having a COBOL program named NIMP151 and it calls for a subprogram MTIM013. And this subprogram is a DB2 program. Now I want to know what is the order of execution.
i.e
Which program should be compiled first..then which program should bind and in which name the Plan should be created and finally how to excute the program...
Am I clear in my asking??
If so please answer me with proper JCLs..

Thanx in advance
Reg,
Srinath.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Nov 20, 2006 1:45 pm
Reply with quote

Hi There,

Please check the prev post


ibmmainframes.com/viewtopic.php?t=15002&highlight=cobol+db2
Back to top
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Mon Nov 20, 2006 2:05 pm
Reply with quote

Hi Gupta,

Thanx..but I tried this out.. but getting Time Stamp Mismatch error i.e SQLcode -818...

So cud you please provide some other detail



Here is what I have done

Compile Main program ( COBOL program - NIMP151)
Compile Sub Program (COBOL-DB2 program - MTIM013)
Bind SUb-Program ( COBOL-DB2 program)
Run the main program

i.e

DSN SYSTEM(DB2D)
RUN PROGRAM(NIMP151) -
PLAN(MTIM013)
END

Thnx in advance
Reg
Srinath
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Nov 20, 2006 2:07 pm
Reply with quote

Hi Srinath,


Is it static call or dynamic call?
Back to top
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Mon Nov 20, 2006 2:14 pm
Reply with quote

it is static call

Reg,
Srinath
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Nov 20, 2006 2:30 pm
Reply with quote

Hi Srinath,

Then just change the order
Compile Sub Program
Bind SUb-Program
Compile Main program
Run the main program
Back to top
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Mon Nov 20, 2006 3:30 pm
Reply with quote

Hi Gupta and others
Its working..
Here I have written what I did..
Compile Main Program
Compile Subprogram
Bind the subprogram

BIND PLAN(NIMP151) MEMBER(MTIM013) OWNER(TCBDBA) ACTION(REPLACE) RELEASE(COMMIT) VALIDATE(BIND) QUALIFIER(VSYSG01) ISOLATION(CS);

Please Note : PLAN name is Main program name i.e COBOL program
Member name is Subprogram name i.e DB2 program


Run the Main Program

DSN SYSTEM(DB2D)
RUN PROGRAM(NIMP151) -
PLAN(NIMP151)
END

And I heard that Program name and the Plan name must be the same..

So hope this will help to some of us..

Ok thanx Gupta and others

Reg,
Srinath.
Back to top
View user's profile Send private message
harsha puthraya

New User


Joined: 29 Oct 2008
Posts: 8
Location: Bangalore

PostPosted: Mon Jan 24, 2011 2:53 pm
Reply with quote

I know that this is a pretty old thread, but i had a question on this.

what would be the order if the main program calls 3 DB2 subprogram?

Will it be,
Compile Main Program
Compile Subprograms
Bind the subprogram into package
Bind plan

where instead of MEMBER, should we use PKLIST?

regards
Harsha
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
Search our Forums:

Back to Top