Focal Point
[CASE-CLOSED]ECHO = ALL isn't showing traces

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

August 24, 2017, 11:04 AM
WF1326
[CASE-CLOSED]ECHO = ALL isn't showing traces
Hi,

We were testing our migration process to 8201m. When i run my fex with -SET &ECHO=ALL; it does not show traces in the source.

On the client admin console, i have the Default options for FEX tracing set to 'Echo On, SQL On'

Is there something that i am missing?

Thank you in advance.

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


WebFOCUS
7703/7705/8105m/8201m/8202m

August 24, 2017, 11:07 AM
MartinY
I normally have the following to see traces
SET SQLTOPTTF = ON
-* Deactivate SQL tracing
SET TRACEOFF  = ALL
-* Disable the trace stamp (Date/Time etc)
SET TRACESTAMP= OFF
-* Set trace line wrapping - # of characters
SET TRACEWRAP = 72
-* Enable Trace for the SQL Translator
SET TRACEON   = SQLTRANS
-* Show Optimization information in HTML page
SET TRACEON   = SQLAGGR//CLIENT
-* Show SQL statements in HTML page
SET TRACEON   = STMTRACE//CLIENT
-* Show SQL generated statement trace in HTML page
SET TRACEON   = STMTRACE/1/CLIENT
-* Show SQL generated sub-statement trace in HTML page
SET TRACEON   = STMTRACE/2/CLIENT

-* Activate SQL tracing
SET TRACEUSER = ON
SET MSG       = ON
SET HOLDSTAT  = ON
SET EMGSRV    = ON
-SET &ECHO    = ALL;



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
August 24, 2017, 11:17 AM
WF1326
Martin,

It still does not show me all traces. The lines of code are not returned. I can see only dialog manager commands in the source.


WebFOCUS
7703/7705/8105m/8201m/8202m

August 24, 2017, 11:20 AM
FP Mod Chuck
Hi WF1326

One of the options on the run icon is to set message viewer on. This should display the results of the -SET &ECHO=ALL;


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
August 24, 2017, 11:23 AM
WF1326
Chuck,

Tried that option too. It didn't work.


WebFOCUS
7703/7705/8105m/8201m/8202m

August 24, 2017, 11:27 AM
MartinY
quote:
It still does not show me all traces. The lines of code are not returned.


And you have pasted "my" SET in your fex (ideally at the beginning) ?

Do you have INCLUDE that may change the trace setting ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
August 24, 2017, 12:46 PM
WF1326
Martin,

And you have pasted "my" SET in your fex (ideally at the beginning) ? Yes

Do you have INCLUDE that may change the trace setting ? No


WebFOCUS
7703/7705/8105m/8201m/8202m

August 24, 2017, 01:15 PM
BabakNYC
Does this show the code in your environment?
 
-SET &ECHO=ALL;
-DEFAULT &COUNTRY = 'ENGLAND';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE COUNTRY EQ &COUNTRY;
END
 



WebFOCUS 8206, Unix, Windows
August 24, 2017, 01:16 PM
MartinY
Please share your code, it may help us to understand where is the issue.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
August 24, 2017, 02:14 PM
WF1326
This code gives me the report output
-SET &ECHO=ALL;
-DEFAULT &COUNTRY = 'ENGLAND';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE COUNTRY EQ '&COUNTRY';
END

But, when i view the source it displays as

[!DOCTYPE html]
[html]
[head]
[meta name="HandheldFriendly" content="True"]
[meta name="PalmComputingPlatform" content="True"]
[title]WebFOCUS Report[/title]
[style type="text/css"]
[!--
TD { vertical-align:top; }
--]
[/style]
[/head]
[body]
[table border cellpadding=1]
[tr]
[td colspan=3]
[table cellpadding=0 width="100%"][tr]
[td]
PAGE 1[/td][/tr][/table][/td]
[/tr]
[tr]
[td style="vertical-align:bottom"]
COUNTRY[/td]
[td style="vertical-align:bottom"]
CAR[/td]
[td align=RIGHT style="vertical-align:bottom"]
SALES[/td]
[/tr]
[tr]
[td]
ENGLAND[/td]
[td]
JAGUAR[/td]
[td align=RIGHT]
12000[/td]
[/tr]
[tr]
[td]
[/td]
[td]
JENSEN[/td]
[td align=RIGHT]
0[/td]
[/tr]
[tr]
[td]
[/td]
[td]
TRIUMPH[/td]
[td align=RIGHT]
0[/td]
[/tr]
[/table]
[/body]
[/html]
[div id='_ibirunmsgs' style='display:none'][pre]
-DEFAULT &COUNTRY = 'ENGLAND';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'ENGLAND';
END
0 NUMBER OF RECORDS IN TABLE= 4 LINES= 3
0 HOLDING HTML FILE ON PC DISK ...
[/pre][/div][script type='text/javascript']
var inlinemsgs = document.getElementById('_ibirunmsgs');
var msgBoxId = '_ibi_runmsgbox';
var winParent = window.parent
try {
var msgBox = winParent.document.getElementById(msgBoxId);
if (msgBox == null && winParent != null) {
winParent = winParent.parent;
if (winParent != null)
msgBox = winParent.document.getElementById(msgBoxId);
}
if (msgBox == null && winParent != null) {
winParent = winParent.parent;
if (winParent != null)
msgBox = winParent.document.getElementById(msgBoxId);
}
if (msgBox == null && winParent != null) {
winParent = winParent.parent;
if (winParent != null)
msgBox = winParent.document.getElementById(msgBoxId);
}
}catch(e){}
if (msgBox != null && inlinemsgs != null && inlinemsgs)
msgBox.innerHTML=inlinemsgs.innerHTML;
[/script]


WebFOCUS
7703/7705/8105m/8201m/8202m

August 24, 2017, 02:29 PM
MartinY
Please use the code tag when posting sample data and/or sample code or whatever else that you copy/paste. This is the last icon on the ribbon
</>


As per what you shared (from a right click/view source on your report result) seems to be the normal behavior.

What is your issue ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
August 24, 2017, 02:39 PM
j.gross
CAR is a FOCUS file, hence in your specimen code there is no generated SQL code and no interaction with a database server to trace.


- Jack Gross
WF through 8.1.05
August 24, 2017, 03:05 PM
FP Mod Chuck
I disagree -SET &ECHO = ALL; should "Echo" the code that was run showing parameter substitution etc. At least it does on my 8105 environment.


< !--
-DEFAULT &COUNTRY = 'ENGLAND';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'ENGLAND';
END
0 NUMBER OF RECORDS IN TABLE= 4 LINES= 3
0 HOLDING HTML FILE ON PC DISK ...



There has to be a setting somewhere preventing this. Check the serever profile (edasprof.prf) to see what settings are in there.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
August 24, 2017, 03:33 PM
MartinY
Adding the -SET &ECHO=ALL (and/or all the previous SET that I posted) just before the TABLE FILE will overwrite any profile.

@Chuck : Doing a TABLE FILE CAR does NOT generates SQL code since it's not performed against a DB as j.gross stated and what is displayed as the traces (as you and WF1326 displayed) it's the result of an -SET &ECHO=ALL with Focus source file.

I think that WF1326 should share its code and the trace when executing the following:

-SET &ECHO=ALL;
-DEFAULT &COUNTRY = 'ENGLAND';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE COUNTRY EQ '&COUNTRY';
ON TABLE HOLD
END
-RUN


Is giving this:
-DEFAULT &COUNTRY = 'ENGLAND';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'ENGLAND';
ON TABLE HOLD
END


And doing the following:
SET SQLTOPTTF = ON
-* Deactivate SQL tracing
SET TRACEOFF  = ALL
-* Disable the trace stamp (Date/Time etc)
SET TRACESTAMP= OFF
-* Set trace line wrapping - # of characters
SET TRACEWRAP = 72
-* Enable Trace for the SQL Translator
SET TRACEON   = SQLTRANS
-* Show Optimization information in HTML page
SET TRACEON   = SQLAGGR//CLIENT
-* Show SQL statements in HTML page
SET TRACEON   = STMTRACE//CLIENT
-* Show SQL generated statement trace in HTML page
SET TRACEON   = STMTRACE/1/CLIENT
-* Show SQL generated sub-statement trace in HTML page
SET TRACEON   = STMTRACE/2/CLIENT

-* Activate SQL tracing
SET TRACEUSER = ON
SET MSG       = ON
SET HOLDSTAT  = ON
SET EMGSRV    = ON
-SET &ECHO    = ALL;

-DEFAULT &COUNTRY = 'ENGLAND';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE COUNTRY EQ '&COUNTRY';
ON TABLE HOLD
END


Is giving this:
-DEFAULT &COUNTRY = 'ENGLAND';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'ENGLAND';
ON TABLE HOLD
END
0 NUMBER OF RECORDS IN TABLE=        4  LINES=      3



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
August 25, 2017, 10:21 AM
WF1326
quote:
Originally posted by MartinY:
Adding the -SET &ECHO=ALL (and/or all the previous SET that I posted) just before the TABLE FILE will overwrite any profile.

@Chuck : Doing a TABLE FILE CAR does NOT generates SQL code since it's not performed against a DB as j.gross stated and what is displayed as the traces (as you and WF1326 displayed) it's the result of an -SET &ECHO=ALL with Focus source file.

I think that WF1326 should share its code and the trace when executing the following:

-SET &ECHO=ALL;
-DEFAULT &COUNTRY = 'ENGLAND';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE COUNTRY EQ '&COUNTRY';
ON TABLE HOLD
END
-RUN


Is giving this:
-DEFAULT &COUNTRY = 'ENGLAND';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'ENGLAND';
ON TABLE HOLD
END


And doing the following:
SET SQLTOPTTF = ON
-* Deactivate SQL tracing
SET TRACEOFF  = ALL
-* Disable the trace stamp (Date/Time etc)
SET TRACESTAMP= OFF
-* Set trace line wrapping - # of characters
SET TRACEWRAP = 72
-* Enable Trace for the SQL Translator
SET TRACEON   = SQLTRANS
-* Show Optimization information in HTML page
SET TRACEON   = SQLAGGR//CLIENT
-* Show SQL statements in HTML page
SET TRACEON   = STMTRACE//CLIENT
-* Show SQL generated statement trace in HTML page
SET TRACEON   = STMTRACE/1/CLIENT
-* Show SQL generated sub-statement trace in HTML page
SET TRACEON   = STMTRACE/2/CLIENT

-* Activate SQL tracing
SET TRACEUSER = ON
SET MSG       = ON
SET HOLDSTAT  = ON
SET EMGSRV    = ON
-SET &ECHO    = ALL;

-DEFAULT &COUNTRY = 'ENGLAND';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE COUNTRY EQ '&COUNTRY';
ON TABLE HOLD
END


Is giving this:
-DEFAULT &COUNTRY = 'ENGLAND';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'ENGLAND';
ON TABLE HOLD
END
0 NUMBER OF RECORDS IN TABLE=        4  LINES=      3


@Martin: I get the same results as you got. This happens since i have ON TABLE HOLD.

Normally, for a HTML report output, when you do a view source, we see this code in green fonts at the end. This isn't happening in 8201m and works great in 8105 as chuck mentioned.

< !--
-DEFAULT &COUNTRY = 'ENGLAND';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'ENGLAND';
END
0 NUMBER OF RECORDS IN TABLE= 4 LINES= 3
0 HOLDING HTML FILE ON PC DISK ...

@Chuck: I checked the edasprof.prf file on the 8201 server. Inaddition to APP PATH and adapter connections, i see these

SET CDN=COMMAS_DOT
SET CURRENCY_ISO_CODE=USD
SET DATE_ORDER=MDY
SET WEEKFIRST=ISO1
SET LANGUAGE=AMENGLISH

I guess these have nothing to do with tracing


WebFOCUS
7703/7705/8105m/8201m/8202m

August 25, 2017, 10:31 AM
WF1326
I think the 8201 is returning the traces but presenting them inside
tags

So in 8201, when the ECHO is OFF i get this in the view source

 <div id='_ibirunmsgs' style='display:none'><pre>
0 NUMBER OF RECORDS IN TABLE=        4  LINES=      3
0 HOLDING HTML FILE ON PC DISK ...
</pre></div> 


With ECHO=ALL i get this
 <div id='_ibirunmsgs' style='display:none'><pre>
-DEFAULT &COUNTRY = 'ENGLAND';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'ENGLAND';
-*ON TABLE HOLD
END
-RUN
0 NUMBER OF RECORDS IN TABLE=        4  LINES=      3
0 HOLDING HTML FILE ON PC DISK ...
</pre></div> 


I wonder why this behavior has been changed in 82 version?. It a bit painful now for debugging an issue.


WebFOCUS
7703/7705/8105m/8201m/8202m

Hi WF1326

This is definitely weird. I just tried it on 8201M and it worked fine. I have the latest gen 106 installed. I think there was some confusion that you were trying SQL traces but that is not the case.

I would suggest you open a case with techsupport at this point, there must be somee setting somewhere preventing this from working.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
It looks like in 8105m and older, the focus code is placed as a comment which would make it stand out more being that it was green in color.


And in 8201m it is being placed inside a div with the css style 'display:none' so it wont show on the html page:


Not sure why they would change this. It was much easier to see the FOCUS code as an HTML comment


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
Here is what I noticed if I use -DEFAULT and the autoprompt comes up I don't see it when I view source after I run the autoprompt. I changed it to -DEFAULTH so the autoprompt does not display and then it showed up as Hallway says in a div tag.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
Chuck is correct when you right click and choose "View Page Source," it won't show very clearly.

However, if you still have it as -DEFAULT and get the auto prompt, then you need to select "View Frame Source" instead


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
This is the reply i got from tech support

ECHO behavior has been changed. This echo used to display as a javascript comment. Notice the previous behavior has a <-- at the beginning and a --> at the end. Effectively treated as a JavaScript comment. Now, the echo displays in a

There is no setting for the old behavior. ECHO hasn't changed. The run messages within a html output file are now in
As a workaround, you can paste the echo (with the escaped characters) into notepad++, hightlight the affect code, and use the TextFX plugin option, Strip HTML tags table nontabs. (don't strip the entire document, it will remove the CRLF tags.


WebFOCUS
7703/7705/8105m/8201m/8202m

For what it's worth, I have found that by using the following at the beginning of a fex will put the ECHO at the bottom of your HTML report so you won't even have to go to the developer options to the the messages inside the div

-SET &ECHO=ALL;
-HTMLFORM BEGIN
<style>#_ibirunmsgs {display:block !important;}</style>
-HTMLFORM END

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


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
I have to say that this is pretty ridiculous.

quote:
As a workaround, you can paste the echo (with the escaped characters) into notepad++, hightlight the affect code, and use the TextFX plugin option, Strip HTML tags table nontabs. (don't strip the entire document, it will remove the CRLF tags.
I don't use NotePas++, so am I SOL?

quote:
I have found that by using the following at the beginning of a fex will put the ECHO at the bottom of your HTML report so you won't even have to go to the developer options to the the messages inside the div
Always have to find a workaround because they've changed things that worked very well. We have to embed HTML code as a workaround.

Now we also have to change the extension of a hand-coded HTML file to something else so that we can edit it.

Very sad.


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
quote:
Very sad.

Sad that it is considered a work around.

The truth is that the "echoed" code is still within the HTML source but it's not as obviously visible as it once was.

The two suggestions are made so that someone can see the "echoed" output clearer - hardly workarounds?

I've got used to locating this and they say that "you can't teach old ......" Wink

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
Tony, you don't think adding (what some IBI people think is illegal) code to a fex just to see the ECHO is a workaround? I was able to view browser source to check for errors, I can't now. I'd consider this a PITA. Could I be wrong?


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
Francis,

I can still use view source to see errors but because they're not within comments they take me slightly longer (milliseconds) to spot. Are you saying that view source doesn't show this for you?

If someone wants to expose the hidden div to get the errors / echoed source onto their screen so that they don't have to look for it, then I would say that is their own debugging technique and not a workaround.

As you are aware, I often add code into my focexecs to manipulate the output. I like to think of it as "enhancing the output" but I suppose that you could consider that a potential workaround depending upon what I am doing.

For instance, I used to hate (I am sure that you also had this hate) having to add an -HTMLFORM begin to insert the <!DOCTYPE html> and more to allow compatability, etc.

That to me was a workaround, but each to their own intepretation Smiler

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
What was improved as a result of this change?


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL