Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

COBOL-DB2 BIND and execute problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: COBOL-DB2 BIND and execute problem
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: 1187
Location: Bangalore,India

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

Hi There,

Please check the prev post


http://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    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Mon Nov 20, 2006 2:07 pm    Post subject:
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    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Mon Nov 20, 2006 2:30 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: COBOL-DB2 BIND and execute problem
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts Why myself doing Package Bind always ... Susanta DB2 5 Thu Mar 02, 2017 10:47 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Bind plan as a member to another bind... rexx77 DB2 0 Thu Feb 16, 2017 2:02 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us