SPL debug
Posted in 2016
A user asked how to debug an Informix SPL stored procedure that was returning an unexplained error. Replies suggested graphical debuggers (AGS Server Studio, IBM Data Studio — noted as free, plus Visual Studio tooling, requiring a reasonably recent IDS version), and the simple route: SET DEBUG FILE TO <path> outside the procedure plus TRACE ON (and TRACE <variable>) inside it; SET EXPLAIN ON with UPDATE STATISTICS FOR PROCEDURE gives query plans. The poster's empty debug file was attributed to omitting TRACE ON, but no confirmation of the final fix is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Stored Procedures & SPL
Hi, I am having some problems with one procedure and I need to debug it. Can anybody help me how to do it? Thanks, SP
AGS's Server Studio has SPL debugging capabilities. IBM Data Studio also has an SPL debugging capability but it's more expensive that Server Studio. Another "simple" alternative is to: SET DEBUG FILE TO <file path>; outside the procedure and SET TRACE ON; inside then plod through the trace file to figure out what's wrong. Simple to set up, tough to slog through all that output. Art Art S. Kagel, President and Principal Consultant ASK Database Management www.askdbmgt.com Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on 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 Sun, Dec 11, 2016 at 12:34 PM, SERGIO PERES <sergio.peres@airc.pt> wrote: > Hi, > > I am having some problems with one procedure and I need to debug it. > Can anybody help me how to do it? > > Thanks, > > SP > > > ************************************************************ > ******************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --047d7b86eaea98a50b05436591da
Art, What do you mean by "but it's more expensive that Server Studio"? "IBM Data Studio is a fully licensed product available at no charge and with no time restrictions." in https://www.ibm.com/developerworks/downloads/im/data/ Regards. On Sun, Dec 11, 2016 at 5:46 PM, Art Kagel <art.kagel@gmail.com> wrote: > AGS's Server Studio has SPL debugging capabilities. IBM Data Studio also > has an SPL debugging capability but it's more expensive that Server Studio. > > Another "simple" alternative is to: > SET DEBUG FILE TO <file path>; > outside the procedure and SET TRACE ON; inside then plod through the trace > file to figure out what's wrong. Simple to set up, tough to slog through > all that output. > > Art > > Art S. Kagel, President and Principal Consultant > ASK Database Management > www.askdbmgt.com > > Blog: http://informix-myview.blogspot.com/ > > Disclaimer: Please keep in mind that my own opinions are my own opinions > and do not reflect on 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 Sun, Dec 11, 2016 at 12:34 PM, SERGIO PERES <sergio.peres@airc.pt> > wrote: > > > Hi, > > > > I am having some problems with one procedure and I need to debug it. > > Can anybody help me how to do it? > > > > Thanks, > > > > SP > > > > > > ************************************************************ > > ******************* > > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > > > --047d7b86eaea98a50b05436591da > > > ************************************************************ > ******************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --94eb2c030928e715a2054365e52f
Art already replied with the alternatives. SET DEBUG ..., IBM Data Studio, AGS Server Studio and if I remember correctly MS Visual Studio. What exactly are you trying to obtain? The execution flow may be clear from the simple SET DEBUG.... You can also include some TRACE instructions with messages. If you're looking for the query plans a simple SET EXPLAIN ON; UPDATE STATISTICS FOR PROCEDURE your_proc may provide that. The external alternatives above may allow step by step execution, variable inspection etc. That will require a relatively recent version of Informix (11.50+ or maybe 11.70+) Regards. On Sun, Dec 11, 2016 at 5:34 PM, SERGIO PERES <sergio.peres@airc.pt> wrote: > Hi, > > I am having some problems with one procedure and I need to debug it. > Can anybody help me how to do it? > > Thanks, > > SP > > > ************************************************************ > ******************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --001a114abc80cb8869054365faff
I guess I stand corrected. BTW the download link is broken, not that you can do anything about it. I did report the broken link. Art Art S. Kagel, President and Principal Consultant ASK Database Management www.askdbmgt.com Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on 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 Sun, Dec 11, 2016 at 1:10 PM, Fernando Nunes <domusonline@gmail.com> wrote: > Art, > > What do you mean by "but it's more expensive that Server Studio"? > "IBM Data Studio is a fully licensed product available at no charge and > with no time restrictions." in > https://www.ibm.com/developerworks/downloads/im/data/ > > Regards. > > On Sun, Dec 11, 2016 at 5:46 PM, Art Kagel <art.kagel@gmail.com> wrote: > > > AGS's Server Studio has SPL debugging capabilities. IBM Data Studio also > > has an SPL debugging capability but it's more expensive that Server > Studio. > > > > Another "simple" alternative is to: > > SET DEBUG FILE TO <file path>; > > outside the procedure and SET TRACE ON; inside then plod through the > trace > > file to figure out what's wrong. Simple to set up, tough to slog through > > all that output. > > > > Art > > > > Art S. Kagel, President and Principal Consultant > > ASK Database Management > > www.askdbmgt.com > > > > Blog: http://informix-myview.blogspot.com/ > > > > Disclaimer: Please keep in mind that my own opinions are my own opinions > > and do not reflect on 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 Sun, Dec 11, 2016 at 12:34 PM, SERGIO PERES <sergio.peres@airc.pt> > > wrote: > > > > > Hi, > > > > > > I am having some problems with one procedure and I need to debug it. > > > Can anybody help me how to do it? > > > > > > Thanks, > > > > > > SP > > > > > > > > > ************************************************************ > > > ******************* > > > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > > > > > > > --047d7b86eaea98a50b05436591da > > > > > > ************************************************************ > > ******************* > > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > > > -- > Fernando Nunes > Portugal > > http://informix-technology.blogspot.com > My email works... but I don't check it frequently... > > --94eb2c030928e715a2054365e52f > > > ************************************************************ > ******************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --001a1148d7be31683f0543661c74
Thanks for your reply. The problem is that the procedure returns an error and I don't understand it. I have used the SET DEBUG FILE but the file was empty, it maybe is some execution or value error?! Regards, SP
Did you turn on TRACE inside the procedure? You have to do both, SET DEBUG FILE ...; and TRACE ON; Art Art S. Kagel, President and Principal Consultant ASK Database Management www.askdbmgt.com Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on 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 Sun, Dec 11, 2016 at 2:04 PM, SERGIO PERES <sergio.peres@airc.pt> wrote: > Thanks for your reply. > The problem is that the procedure returns an error and I don't understand > it. > I have used the SET DEBUG FILE but the file was empty, it maybe is some > execution or value error?! > > Regards, > > SP > > > ************************************************************ > ******************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --001a1148d7be9355f0054367043f
TRACE ON after the SET DEBUG line You can then do TRACE <variable> Cheers Paul -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of SERGIO PERES Sent: Sunday, December 11, 2016 1:04 PM To: ids@iiug.org Subject: Re: SPL debug [38287] Thanks for your reply. The problem is that the procedure returns an error and I don't understand it. I have used the SET DEBUG FILE but the file was empty, it maybe is some execution or value error?! Regards, SP **************************************************************************** *** Forum Note: Use "Reply" to post a response in the discussion forum.