Return with resume
Posted in 2000
Topics: Stored Procedures & SPL, Jobs, Consulting & Announcements
This is a multi-part message in MIME format. ------=_NextPart_000_00B9_01C05883.9903D860 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi All,=20 URGENT !!!! I have written a stored procedure that returns several result sets. = Basically after every 100 records the program issues a "return with = resume" statement. My expectation is that after every 100 records the = results would be made available to the calling program while the = procedure continues processing the next 100 records. This is not so. The = procedure actually executes in its entirety and then makes the results = available. Is there a way for me to get the procedure to return return = after every 100 records processed ? By the way this procedure is being called from a powerbuilder front-end = program using powerbuliders's "FETCH" statement. Regards, Dayton ------=_NextPart_000_00B9_01C05883.9903D860 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"> <HTML> <HEAD> <META content=3Dtext/html;charset=3Diso-8859-1 = http-equiv=3DContent-Type> <META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT color=3D#000000 size=3D2>Hi All, </FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT><FONT color=3D#ff0000 = face=3D"" size=3D4>URGENT=20 !!!!</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2>I have written a stored procedure = that returns=20 several result sets. Basically after every 100 records the program = issues a=20 "return with resume" statement. My expectation is that after = every 100=20 records the results would be made available to the calling program while = the=20 procedure continues processing the next 100 records. This is not so. The = procedure actually executes in its entirety and then makes the results=20 available. Is there a way for me to get the procedure to return return = after=20 every 100 records processed ?</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT size=3D2>By the way this procedure is being called from a = powerbuilder=20 front-end program using powerbuliders's "FETCH"=20 statement.</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>Regards,</FONT></DIV> <DIV><FONT color=3D#000000 = size=3D2> Dayton</FONT></DIV></BODY></HTML> ------=_NextPart_000_00B9_01C05883.9903D860--
Dayton Spencer wrote: > This is a multi-part message in MIME format. Don't post MIME. > Hi All, > URGENT !!!! > I have written a stored procedure that returns several result sets. = > Basically after every 100 records the program issues a "return with = > resume" statement. My expectation is that after every 100 records the = > results would be made available to the calling program while the = > procedure continues processing the next 100 records. This is not so. The = > procedure actually executes in its entirety and then makes the results = > available. Is there a way for me to get the procedure to return return = > after every 100 records processed ? A stored procedure returns one row of values for each RETURN executed; if it is qualified by WITH RESUME, it will try to return more values. If you process 100 rows and then do a RETURN WITH RESUME, you have decided (possibly unwittingly) that only every 100th row needs to be processed by whatever it is that calls the stored procedure. If you want the called code to see each row, return each row using RETURN WITH RESUME. > By the way this procedure is being called from a powerbuilder front-end = Hmmm, I suppose that's a new way of living in sin. :-) -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"