If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > call a procedure with in a procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-21-10, 09:47
lazydev lazydev is offline
Registered User
 
Join Date: Mar 2010
Posts: 15
call a procedure with in a procedure

Hi DBA's

How to call a stored procedure with in a stored procedure

for example

in a stored procedure we declare a variable and assign the value

select substr('EXAMPLE',1,4) into vlist from sysibm.sysdummy1;

how do assign the output of a stored procedure to other variable in a stored procedure

call (a,b,?)

how do we get the output to a variable in a stored procedure

any examples of calling stored procedures in stored procedures


Thanks
Reply With Quote
  #2 (permalink)  
Old 04-22-10, 04:50
tonkuma tonkuma is offline
Registered User
 
Join Date: Feb 2008
Location: Japan
Posts: 2,193
Quote:
for example

in a stored procedure we declare a variable and assign the value

select substr('EXAMPLE',1,4) into vlist from sysibm.sysdummy1;
For example

call another_proc(a,b,vlist);

where another_proc was created by
CREATE PROCEDURE another_proc(IN x data-type1 , IN y data-type2 , OUT z data-type3) ...
Reply With Quote
  #3 (permalink)  
Old 04-22-10, 05:40
lazydev lazydev is offline
Registered User
 
Join Date: Mar 2010
Posts: 15
thanks

it works
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On