dbTalk Databases Forums  

SPL processing question

comp.databases.informix comp.databases.informix


Discuss SPL processing question in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kennedy, Randy
 
Posts: n/a

Default SPL processing question - 08-26-2010 , 10:19 AM






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

Reply With Quote
  #2  
Old   
Art Kagel
 
Posts: n/a

Default Re: SPL processing question - 08-26-2010 , 10:35 AM






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 (AT) iiug (DOT) 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 (AT) scottsdaleaz (DOT) gov>wrote:

Quote:
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 (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list

Reply With Quote
  #3  
Old   
Kennedy, Randy
 
Posts: n/a

Default RE: SPL processing question - 08-26-2010 , 11:28 AM



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 <mailto:RKennedy (AT) ScottsdaleAZ (DOT) gov>



From: Art Kagel [mailto:art.kagel (AT) gmail (DOT) com]
Sent: Thursday, August 26, 2010 8:35 AM
To: Kennedy, Randy
Cc: informix-list (AT) iiug (DOT) 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 (AT) iiug (DOT) 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 (AT) scottsdaleaz (DOT) 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 (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list

Reply With Quote
  #4  
Old   
Art Kagel
 
Posts: n/a

Default Re: SPL processing question - 08-26-2010 , 12:27 PM



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 (AT) iiug (DOT) 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 (AT) scottsdaleaz (DOT) gov>wrote:

Quote:
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 <RKennedy (AT) ScottsdaleAZ (DOT) gov>*



*From:* Art Kagel [mailto:art.kagel (AT) gmail (DOT) com]
*Sent:* Thursday, August 26, 2010 8:35 AM
*To:* Kennedy, Randy
*Cc:* informix-list (AT) iiug (DOT) 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 (AT) iiug (DOT) 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 (AT) scottsdaleaz (DOT) 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 (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list



Reply With Quote
  #5  
Old   
Kennedy, Randy
 
Posts: n/a

Default RE: SPL processing question - 08-26-2010 , 02:45 PM



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 (AT) gmail (DOT) com]
Sent: Thursday, August 26, 2010 10:28 AM
To: Kennedy, Randy
Cc: informix-list (AT) iiug (DOT) 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 (AT) iiug (DOT) 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 (AT) scottsdaleaz (DOT) 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 (AT) gmail (DOT) com]
Sent: Thursday, August 26, 2010 8:35 AM
To: Kennedy, Randy
Cc: informix-list (AT) iiug (DOT) 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 (AT) iiug (DOT) 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 (AT) scottsdaleaz (DOT) 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 (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list
*

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.