Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Problem capturing SQL script

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Problem capturing SQL script
 Login/Join
 
Gold member
posted
All,
Searching this forum, I learned that the following lines of code would capture the SQL script but wouldn't acutally run it.
 SET TRACEOFF = ALL
SET TRACEON = STMTRACE//CLIENT
SET TRACEON = STMTRACE//CLIENT
SET TRACEUSER = ON
SET XRETRIEVAL = OFF 


but, when I try this, I don't see any code on screen or in view source in Internet Explorer.

Here is the code:
 SET TRACEOFF = ALL
SET TRACEON = STMTRACE//CLIENT
SET TRACEON = STMTRACE//CLIENT
SET TRACEUSER = ON
SET XRETRIEVAL = OFF


-*=========================================================

TABLE FILE GGSALES
SUM UNITS DOLLARS
BY REGION
BY CATEGORY
ON REGION SUBTOTAL
WHEN DOLLARS GT 11500000
SUBFOOT
"The total for the (REGION region is less than 11500000."
WHEN DOLLARS LT 11500000
 
END 


Here is the result:

 No HTML Output!

--------------------------------------------------------------------------------


 ...RETRIEVAL KILLED
 0 NUMBER OF RECORDS IN TABLE=        0  LINES=      0


 


and here is the result in IE view source:
 <HTML>
<HEAD>
<TITLE>WebFOCUS Message[42]:  NO EDA HTML Output</TITLE>
</Head>
<Body>
<HR><H3 ALIGN=center>No HTML Output!</H3><HR>
<PRE>
<H5>
 ...RETRIEVAL KILLED
 0 NUMBER OF RECORDS IN TABLE=        0  LINES=      0

</H5>



< !--
...RETRIEVAL KILLED
0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0

-->

Why can I not capture the generate SQL without running the report?

Thank you for your help,

Seyed

This message has been edited. Last edited by: SeyedG,
 
Posts: 90 | Location: Oklahoma City, Oklahoma | Registered: July 01, 2010Report This Post
Gold member
posted Hide Post
All,
It turns out that the reason this code did not generate SQL script is because the ggsales table is from a Focus database and not from a SQL based database. According to IBI support, SQL trace DOES NOT work with FOCUS files. I tried the trace scripts against a SQL based master file, they worked.

Seyed

This message has been edited. Last edited by: SeyedG,
 
Posts: 90 | Location: Oklahoma City, Oklahoma | Registered: July 01, 2010Report This Post
Expert
posted Hide Post
As FOCUS databases are not SQL tables, SQL code does not need to be generated to retrieve information. The same goes with any datasource that is not SQL related, such as flat files.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
SQL code could not be viewed while reteriving data through Master file approach.

If generate also, you could not expect to see that in your Browser's view source. That might be saved temproarily in the Server side. That has got nothing to do with the client side.


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
Platinum Member
posted Hide Post
Hi Ram

We can see the SQL code through above code .. when we using master file which is generated from the RDMS data source


WebFOCUS 7610
Windows
 
Posts: 121 | Registered: September 25, 2007Report This Post
Guru
posted Hide Post
13.42.38 AE SELECT T1.`ID`,T1.`FINANCIAL_YEAR`,T1.`FINANCIAL_PERIOD`,
13.42.38 AE T1.`ROLLUP_CODE`,T1.`BRAND_CODE`,T1.`BRN_CODE`,T1.`AREA_CODE`,
13.42.38 AE T1.`REGION_CODE`,T1.`CURRENCY_CODE`,T1.`BRN_NAME`,
13.42.38 AE T1.`TYPE_CODE`,T1.`BRN_STATUS`,T1.`NSF`,T1.`MENOBVATX`,
13.42.38 AE T1.`WOMOBVATX`,T1.`MENOBSAL`,T1.`WOMOBSAL`,T1.`VATRATE`,
13.42.38 AE T1.`Z_SALES`,T1.`MENSLOSS`,T1.`WOMSLOSS`,T1.`ZOWNBUY`,
13.42.38 AE T1.`Z_MARGIN`,T1.`Z_PAYRO`,T1.`Z_OPS`,T1.`Z_ESTMT`,T1.`Z_BRCON`,
13.42.38 AE T1.`PROPRECD`,T1.`Z_GPCO`,T1.`SAMPLENEW`,T1.`SAPPORT`,
13.42.38 AE T1.`Field1` FROM CUMULATIVE_ACTUAL T1;
...RETRIEVAL KILLED
0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0



Yes.. I am able to. Thanks for the Info.


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
Expert
posted Hide Post
Hi Seyed,

Suggestion from our internals: You can also add the setting:

SET TRACESTAMP=OFF

with the other trace setting. This will remove the datetime stamp from the translated SQL and makes it much easier to cut/paste into native query tools.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Problem capturing SQL script

Copyright © 1996-2020 Information Builders