Focal Point
[SOLVED] Debugging strategy in webfocus ..?

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5507011106

March 28, 2011, 03:30 PM
swati
[SOLVED] Debugging strategy in webfocus ..?
Hi All,
can someone explain me the Debugging strategy in webfocus.
please suggest me the best way that Debugging is accomplished in webfocus tool.
suppose if i get an error in webfocus then suggest me the best way to approach to get rid of the error.

thanks all..

This message has been edited. Last edited by: Kerry,


7.6.7
windows
PDF,EXCEL.
March 28, 2011, 04:56 PM
Waz
This very much depends on the type of error you get.

If the agent crashes, then you will probably have to turn tracing on, on the server.

If you get an error, always check the first error found, not the last.

There should be a line number with the error, it should be the line the error is on. Sometimes it can be the previous error.

Always research the error, understand what the message means, and any hints as to what the error is about, like the field name or column number, etc.

With difficult errors, I always start breaking the report down, to find the cause, Add a breakpoint (-EXIT), and then test to see if the report works to this point correctly.

Turn code echoing on with -SET &ECHO=ALL;, this can highlight issues.

Turn SQL tracing on with:
SET TRACEOFF  = ALL
SET TRACEON   = SQLAGGR//CLIENT
SET TRACEON   = STMTRACE//CLIENT
SET TRACEON   = STMTRACE/2/CLIENT
SET TRACEUSER = ON


This could highlight issues with SQL generation against the tables.

There are many more things that could be done, but as mentioned before, it is relative to the type of debugging needed.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

March 28, 2011, 05:08 PM
swati
thanks WAZ..


7.6.7
windows
PDF,EXCEL.
March 28, 2011, 06:19 PM
Norb Eckert
Sure wish we could step through/over over code, inspect variables, set watches etc. like a real IDE. Setting breakpoints and staring at another window is a real PITA.

Just my 2-cents worth. Wink


prod:7.6.9, win2k3 mre, caster, bid, devstudio 7.6.9
March 28, 2011, 08:54 PM
Francis Mariani
Well, I think debugging a WebFOCUS program is quite easy and very manageable - after all it's a reporting ;language, not much can go wrong if you write good, clean code.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
March 29, 2011, 05:49 AM
GamP
But still, even if you do have the most clean code, it is possible that to the innocent user/developer it seems that strange things are happening. And then it is good to know what debugging option you have available to you.


GamP

- Using AS 8.2.01 on Windows 7 - IE11.
in Focus since 1988
March 29, 2011, 09:20 AM
Francis Mariani
They've been well documented in FocalPoint.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
March 29, 2011, 05:00 PM
Waz
Does anyone remember the, I think, mainframe Modify, where you could step through the process, and check variables. I think it was also in PC/FOCUS, and FOCUS Six.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

March 30, 2011, 04:55 AM
GamP
Sure thing, MODIFY FILE xxx DEBUG ...
I seem to remember that there is also a debug feature available for maintain. Don't exactly remember how to use it, though.


GamP

- Using AS 8.2.01 on Windows 7 - IE11.
in Focus since 1988
March 31, 2011, 08:11 PM
Jim Morrow
With MODIFY FILE xxx DEBUG just look at //HLIPRINT DD statement.

Yes I still use the mainframe for for somethings. When faced with a 250 million records with a record length of 5000 characters and three occurs 24 segments, I will take that good old mainframe channel speed anytime Smiler


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3



March 31, 2011, 08:26 PM
Jim Morrow
When debugging, the first question is where is the error happening. Is it in the Dialogue Manager, the data base retrieval (SQL etc), the table request, the Web-focus style sheet, the java script or the HTML?

To help locate the problem I will SET XRETREIVAL OFF, comment out the style sheet, use the previous mentioned -SET &ECHO=ALL; and of course the JAVA script debugger.


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3