Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     How to find what SQL is generated
Go
New
Search
Notify
Tools
Reply
  
How to find what SQL is generated
 Login/Join
 
<NIVAS>
posted
Hi
My question is
What SQL is generated if an Alpha or Date field is SUMmed in a WebFOCUS request?
Please let us know if u guys any idea

I did try this way but i didnt find sql generated when i view source code on html output

SET TRACEUSER = ON
SET TRACEON = STMTRACE//CLIENT
TABLE FILE filename
PRINT field
END

Thanks,
nivas


Thanks,
 
Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi There

This usually works for me. Place this after your request and then view source. Like this...

TABLE FILE filename
PRINT field
END
SET TRACEOFF = ALL
SET TRACEON = SQLAGGR//CLIENT
SET TRACEON = STMTRACE//CLIENT
SET TRACEON = STMTRACE/2/CLIENT
SET TRACEUSER = ON
 
Posts: 246 | Location: Montreal, QC, Canada | Registered: October 01, 2003Reply With QuoteReport This Post
Member
posted Hide Post
Mmm...this doesn't work for me either. I'm using WF Browser 4.3.6

Just trying to trace

TABLE FILE CAR
PRINT MODEL
END

Never able to see any trace within the 'view source'. Any ideas ?
 
Posts: 21 | Registered: January 27, 2004Reply With QuoteReport This Post
Guru
posted Hide Post
I get my trace like this; you may need the echo and you may need to add an -EXIT before it produces a report to see the trace. Good Luck!

SET MSG=ON
-SET &ECHO=ALL;
SET TRACEOFF = ALL
SET TRACEON = STMTRACE//CLIENT
SET TRACEON = STMTRACE/2/CLIENT
SET TRACEUSER = ON
-RUN

BTW, Jodye - the think setting the AGGR/CLIENT makes Focus do the work.

Carol
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Reply With QuoteReport This Post
Member
posted Hide Post
quote:
Originally posted by Carol Dobson:
[qb] I get my trace like this; you may need the echo and you may need to add an -EXIT before it produces a report to see the trace. Good Luck!

SET MSG=ON
-SET &ECHO=ALL;
SET TRACEOFF = ALL
SET TRACEON = STMTRACE//CLIENT
SET TRACEON = STMTRACE/2/CLIENT
SET TRACEUSER = ON
-RUN

Carol [/qb]
Tried it...no luck. What do you mean by putting a -EXIT BEFORE the report ? If I do that, the code stops there and of course the report doesn't show. This is ran from the ad hoc window from the server (Focus Request Session). I just execute a fex with this inside, please tell me what's wrong :

SET MSG=ON
-SET &ECHO=ALL;
SET TRACEOFF = ALL
SET TRACEON = STMTRACE//CLIENT
SET TRACEON = STMTRACE/2/CLIENT
SET TRACEUSER = ON
-RUN

TABLE FILE CAR
PRINT MODEL
WHERE COUNTRY EQ 'ENGLAND'
END
-RUN
-EXIT
 
Posts: 21 | Registered: January 27, 2004Reply With QuoteReport This Post
Guru
posted Hide Post
The CAR file is not a SQL table, so the trace won't work! Remember this is to see a SQL trace.

Here's a real request;

SET MSG=ON
-SET ECHO=ALL;
SET TRACEOFF = ALL
SET TRACEON = STMTRACE//CLIENT
SET TRACEON = STMTRACE/2/CLIENT
SET TRACEUSER = ON
-RUN

TABLE FILE ASTFOC
PRINT PORTFOLIO_A
IF READLIMIT EQ 100
END
-RUN

Then select VIEW, SOURCE
to see the trace; Here's a real trace.

15.12.31 AE SELECT TOP 100 T1."PORTFOLIOSHORTNAME" FROM dbo.MonthEnd T1;
0 NUMBER OF RECORDS IN TABLE= 100 LINES= 100
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Reply With QuoteReport This Post
Member
posted Hide Post
Darn! How stupid of me... Tried it on another table, worked. Thanks!
 
Posts: 21 | Registered: January 27, 2004Reply With QuoteReport This Post
Member
posted Hide Post
Trying to get this to work on mainframe FOCUS (V7.2). I'm joining an internal HOLD file to a DB2 file and getting incorrect output. Long time ago you could allocate FSTRACE3 and FSTRACE4, but that no longer works. I get nothing when using the methods you've described. Any ideas? Thanks.
 
Posts: 15 | Registered: May 17, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
koslo:

FSTRACE3 and FSTRACE4 still works for me on 7.1.1, and according to Tracing DB2 Interface Processing documentation, FSTRACEn must work on 7.2.

Regards,
Mikel
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Reply With QuoteReport This Post
<Kyle>
posted
To make the tracing process quicker, try adding

SET XRETRIEVAL=OFF

to the request. This will generate the same traces as above but it won't actually submit the query to the database; very useful if your request takes a while to run on you don't want to do a "View Source" document.
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     How to find what SQL is generated

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.