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.
Announcement
Collapse
No announcement yet.
Easiest fastest way to debug an SQL UDF (preferably from green screen)
From Green Screen you can only debug the generated C code (STRDBG then STRSQL and run your UDF).
A better way is to use the graphical debugger included in the RUN SQL SCRIPT tools integrated in Client Access or better Access Client Solution (ACS).
Open RUN SQL SCRIPT --> RUN --> System Debugger --> Select your Program or Service Program (UDFs are Service Programs). You need the system name for the program or service program, not the function name.
Set a single or mutliple break points.
Run your UDF and debugg.
For debugging the SQL code, you need to include SET OPTION DbgView = *Source (Before the first Begin/End Block) in your source code
From Green Screen you can only debug the generated C code (STRDBG then STRSQL and run your UDF).
A better way is to use the graphical debugger included in the RUN SQL SCRIPT tools integrated in Client Access or better Access Client Solution (ACS).
Open RUN SQL SCRIPT --> RUN --> System Debugger --> Select your Program or Service Program (UDFs are Service Programs). You need the system name for the program or service program, not the function name.
Set a single or mutliple break points.
Run your UDF and debugg.
For debugging the SQL code, you need to include SET OPTION DbgView = *Source (Before the first Begin/End Block) in your source code
Birgitta
I finally got back into this.
From the debugger i started it up and i see programs, service programs, and class files. However i am unable to click anything to invoke some action to allow me to choose the udf.
I am connected to the system and able to do sql scripts no problem.
any ideas?
I've used it in that form, but I most often use the standalone System i5 Graphical Debugger. I first used it on WinXP, but I use it on Linux... especially since I'm not yet able to use iNav on Linux. Either way, it can take some practice, especially getting the right options set at the start of a debug session.
Tom
There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.
Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
Comment