MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SQL stored procedures

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
valeti_sashi
Beginner


Joined: 11 May 2005
Posts: 12
Topics: 7
Location: Chennai, India

PostPosted: Tue Aug 29, 2006 12:36 am    Post subject: SQL stored procedures Reply with quote

Hi All,

i have created a COBOL stored ptrocedure in SPUFI. if i have to use the procedure in my program, what i have to do (ie shouild i complie the procedure, how to compile ?). please metion the steps in compliation of the procedure.


thanks in advance.

regards,
sashi
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Tue Aug 29, 2006 4:38 am    Post subject: Reply with quote

valeti_sashi,

Check this link which will answer all your queries

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNAPH11/6.2?DT=20010710165542

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
valeti_sashi
Beginner


Joined: 11 May 2005
Posts: 12
Topics: 7
Location: Chennai, India

PostPosted: Wed Aug 30, 2006 1:36 am    Post subject: Reply with quote

Kolsu,

i know how to code these procedures, but my question is to use? i tried compiling of a simple COBOL procedure. My doubts are
1. do we have to create a Package for the procedure or only binding is enough.
2. After compilation, should we write a cobol program to use the procedure? can
we call the procedure outside mainframe, ie Java or any other open system


please anser these boubts.


thanks in advance,

rergards,
sashi.
_________________
Regards,
Sashidhar
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Wed Aug 30, 2006 2:16 am    Post subject: Reply with quote

To 1.
Binding a stored procedure creates a DB2 package.

To 2.
A stored procedure can be used in an application program by issuing
"EXEC SQL CALL procedure-name;" With this, the using module itself has SQL statements embedded and is therefore a DB2 program itself.

regards
Christian
Back to top
View user's profile Send private message
valeti_sashi
Beginner


Joined: 11 May 2005
Posts: 12
Topics: 7
Location: Chennai, India

PostPosted: Wed Aug 30, 2006 3:17 am    Post subject: Reply with quote

Christian,


sorry my first is specfied wrongly, actual doubt is do we need to create a Plan or only binding is sufficient

thanks for the answers.

regards,
sashi.
_________________
Regards,
Sashidhar
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Wed Aug 30, 2006 7:20 am    Post subject: Reply with quote

Quote:

sorry my first is specfied wrongly, actual doubt is do we need to create a Plan or only binding is sufficient


How can you bind without a plan ? read the section 6.2.4.11 Preparing a stored procedure in the first link given by me and you will have a better understanding.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group