Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to build/compile SQL Stored Procedures

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: How to build/compile SQL Stored Procedures
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    Post subject: Re: SQL Stored Procedures
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us