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

does a stored procedure use a Plan


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

New User


Joined: 31 Oct 2005
Posts: 27

PostPosted: Tue Sep 05, 2006 1:59 pm
Reply with quote

I am writing a stored procedure in cobol for accessing data that is on DB2, now i need to compile it. and since it a cobol pgm i assume the compile steps will be similar too.

so in this case for the bind step, do we need to create a plan for this stored procedure??

has anyone used cobol SP? so as to explain to me the steps involved in compiling n setting this up.?
Back to top
View user's profile Send private message
valeti_sashi

New User


Joined: 23 Jun 2006
Posts: 7

PostPosted: Wed Sep 13, 2006 2:20 pm
Reply with quote

stored procedure can not be executed by itself. it needs a program to call it. so there is no need of Plan for a SP. and the steps of compilation are exactly similar as normal cobol db2 program, only diff is u do creatd a plan for SP
Back to top
View user's profile Send private message
kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Wed Sep 13, 2006 8:29 pm
Reply with quote

Use the following query in the cobol program

EXEC SQL
CALL <strred procedutre>
( :<arguments1,
:<arguments2,
:<arguments3)
END-EXEC.

There is a need for binding since DBRM is created.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Invoke stored procedure via batch JCL. DB2 2
No new posts Calling COBOL DB2 program from a COBO... COBOL Programming 2
No new posts Cond parameter and Rc code of a proce... JCL & VSAM 5
This topic is locked: you cannot edit posts or make replies. Internal Autonomous Stored Procedure ... DB2 6
No new posts Stored procedure cpu utilization DB2 1
Search our Forums:

Back to Top