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

How to build/compile SQL Stored Procedures


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

New User


Joined: 23 Jun 2006
Posts: 7

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

Hi,

i had created a pure SQL stored procedure in DB2. Now the question is how to build/compile it. is there any command in SQL itself like Compile in oracle or do we have to use a JCL compiler for binding it. it if we have to use the JCL compiler, please send me the send also.

please help me in this concerns.

regards,
sashidhar
Back to top
View user's profile Send private message
IbmBoy

New User


Joined: 16 Sep 2006
Posts: 1
Location: Cranberry Twp., PA

PostPosted: Sat Sep 16, 2006 1:29 am
Reply with quote

I am new to this, but I am using WinSQL to attach to and create/edit my stored procedures.
Back to top
View user's profile Send private message
anamikak

New User


Joined: 10 May 2006
Posts: 64
Location: Singapore

PostPosted: Tue Sep 19, 2006 9:36 am
Reply with quote

If you have created an internal db2 Sql stored procedure, run it on the SPUFI(I am assuming that you are using z/os or os390) with create procedure statement and embed the sql procedure within a begin and end clause. If the SPUFI run is successful, you can check the SYSIBM.SYSROUTINES table and find your procedure there.
Back to top
View user's profile Send private message
valeti_sashi

New User


Joined: 23 Jun 2006
Posts: 7

PostPosted: Tue Sep 19, 2006 11:59 am
Reply with quote

anamikak,

i know how to create and run a procedure, but after creating and before executing we should compile and bind the procedure. i want the procedure to compile.

plesse let me know if u have worked on it.
Back to top
View user's profile Send private message
anamikak

New User


Joined: 10 May 2006
Posts: 64
Location: Singapore

PostPosted: Tue Sep 19, 2006 12:38 pm
Reply with quote

Do a normal db2 precompile using a standard JCL and do a package bind on the resulting DBRM.
Back to top
View user's profile Send private message
valeti_sashi

New User


Joined: 23 Jun 2006
Posts: 7

PostPosted: Tue Sep 19, 2006 6:19 pm
Reply with quote

anamikak,

can u give the jcl that does the precompilation step.

thanks in advance.
Back to top
View user's profile Send private message
satya123
Warnings : 1

New User


Joined: 18 Aug 2006
Posts: 57

PostPosted: Fri Dec 01, 2006 4:24 pm
Reply with quote

please send me some examples of stored proc and its process...


Please
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 Dynamically build unload and load sta... DB2 14
No new posts Compile Sp Cobol base COBOL Programming 1
No new posts Dynamically build sort control statem... SYNCSORT 18
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Compile rexx code with jcl CLIST & REXX 6
Search our Forums:


Back to Top