IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    SK001, SK002, VB001 - when and why do these appear?
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
I went on a goose chase today - SQL trace showing problems with a query using SK001, SK002, VB001....

Since we don't use those variable naming conventions, and I couldn't find them in a search of our focexec directory, I assumed it just *couldn't* be our code Smiler Wrong! How - specifically - does this SQL translation occur?

From what I can tell it occurs when IF-THEN-ELSE optimization takes place when the aggregation can totally be handled by the RDBMS?

We always strive to have the joins passed to DB2, but often (most times) the aggregation cannot be passed. Is this a result of total aggregation being handled? Where does SK001, SK001 come from - are these internal SQL/DB2 variables, or FOCUS created variables? Is this the equivalent of column notation? It really threw me for a loop looking at code that only seemed marginally like my own Smiler

Thanks!

WebFOCUS 7.6.1
AIX


WebFOCUS 7.6.1
AIX / Windows 2003
 
Posts: 7 | Location: Milwaukee | Registered: February 16, 2006Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
I assume, that the sql trace you're speaking of is the db2 sql trace and not the WebFOCUS trace?

You can quite easily find out what sql code is being generated by WebFOCUS by issuing the appropriate tracing commands in your fex. In combination with the SET XRETRIEVAL=OFF, you will not even access the database engine, but only generate the sql. This might shed some more light on your 'goose chase'.
If you need to know how to activate the traces, search the forum. There are a lot of posts dealing with tracing....


GamP

- Using 764 on WinXP (sp2) - IE7.
- Also available are versions from 534 up to 766 on Windows (XP/2000/2003EE)
 
Posts: 518 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
Sorry GamP - yes - this is the SQL trace I'm looking at. That was the reason I couldn't find the fields in question - because they were not in my focexec - they were being generated as part of the SQL being passed to DB2.

While we don't have access to run server traces, we do run SQL traces as well as -ECHO &ALL on just about every focexec and are familiar with them.


WebFOCUS 7.6.1
AIX / Windows 2003
 
Posts: 7 | Location: Milwaukee | Registered: February 16, 2006Reply With QuoteEdit or Delete MessageReport This Post
Expert
Posted Hide Post
I've seen this before and I don't think you have to worry about it, unless you get SQL trace warning/error messages regarding aggregation, joins, etc.

It think this happens when the join gets complex. You could try rearranging the join structure...


Francis



Env 1: WebFOCUS 5.3.2 Servlet - MRE/BID/Self Service/ReportCaster - MS Windows Server 2003 - IIS/New Atlanta ServletExec - MS SQL Server 2000 - DataMigrator 5.3.4
Env 2: WebFOCUS 7.6.5 Servlet - MRE/BID/Self Service - MS Windows XP SP2 - Apache Tomcat/5.5.25 - MS SQL Server 2000
Env 3: WebFOCUS 5.3.3 CGI - Self Service - AIX 5.2 - IBM DB2
Output formats: HTML, Excel 2000 and PDF
 
Posts: 3379 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    SK001, SK002, VB001 - when and why do these appear?

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