RE: SPL processing question
Posted in 2010
Still doesn't work as desired. Now when I force an error in the main processing section, it just returns the value1,value2 fields with no rows instead of the error that was generated. Not sure there is a way to accomplish what I am desiring. Did fix the issue if I force the error in the additional processing section, I know get the return info. Thanks, Randy From: Art Kagel [mailto:art.kagel@gmail.com] Sent: Thursday, August 26, 2010 10:28 AM To: Kennedy, Randy Cc: informix-list@iiug.org Subject: Re: SPL processing question Create function.... ON EXCEPTION SET sql_code, sql_isam, sql_data END EXCEPTION WITH RESUME; Begin work; Do main processing of function Commit work; Return value1,value2 WITH RESUME; Do some more processing that is irrelevant to primary call and doesn't have a return statement, just ends when complete. End function; Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Thu, Aug 26, 2010 at 12:28 PM, Kennedy, Randy <RKennedy@scottsdaleaz.gov> wrote: I doesn't let me put the ON EXCEPTION clause after the return. The error codes may be the same in both sections. I want any/all errors in primary section to be returned to the web app, just the secondary section errors ignored/continued. Thanks, Randy From: Art Kagel [mailto:art.kagel@gmail.com] Sent: Thursday, August 26, 2010 8:35 AM To: Kennedy, Randy Cc: informix-list@iiug.org Subject: Re: SPL processing question Put in a ON EXCEPTION clause to capture and ignore the errors. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Thu, Aug 26, 2010 at 11:19 AM, Kennedy, Randy <RKennedy@scottsdaleaz.gov> wrote: IDS 9.4FC3 HP/UX 11.11 We have a function where we are trying to ensure the return is done even if there is a problem later in the routine, but when I purposefully make the end portion fail, it doesn't return the values before returning the error message. It is called from a web app and as long as it doesn't fail up to the return, it's good for the web app, the rest of the function is for additional processing has no bearing on the web app call. Is there a way to do this so it will, barring failure in the main processing section, return the result, then continue processing. Ideally, it would be 2 functions with the web app calling both, but don't have control of the web app calls so trying to do it from the 1 existing call I have to work with. Example. Create function.... Begin work; Do main processing of function Commit work; Return value1,value2 WITH RESUME; Do some more processing that is irrelevant to primary call and doesn't have a return statement, just ends when complete. End function; Thanks, Randy _______________________________________________ Informix-list mailing list Informix-list@iiug.org http://www.iiug.org/mailman/listinfo/informix-list