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 

convert DB2 Stored procedure

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


Joined: 13 Jun 2008
Posts: 1
Topics: 1

PostPosted: Mon Jun 16, 2008 2:01 am    Post subject: convert DB2 Stored procedure Reply with quote

How to I convert the DB2 stored procedure into an atomic script? The stored procedure is given below.

CREATE PROCEDURE ABCD.NEWINSERT()
LANGUAGE SQL
P1:BEGIN

DECLARE < few variables >

DECLARE C1 CURSOR FOR < select stmt with where
condition>

OPEN C1;

ins_loop: LOOP

FETCH C1 INTO < variables>

<SKIP LOOP LOGIC>

INSERT INTO functionname(list of columns) values (list of values)

END LOOP

CLOSE C1;
END P1
Back to top
View user's profile Send private message
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