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.
I have a focus executable I am trying to write where I create a new field to be used on the fly. I thought i could simply add a "DEFINE" in line after the joins of tables then report on that new field.
The new field has to be defined after the joins because the logic uses data across the combined tables so it is not defined in the master files.
A COMPUTE will not work because I need to use the field in the WHERE clause.
Example:
...
JOIN
LEFT_OUTER CLUBMEMBERS.CLUBMEMBERS.MEMBERID IN CLUBMEMBERS TO UNIQUE
CLUBSWITCHES.CLUBSWITCHES.MEMBERID IN CLUBSWITCHES TAG J8 AS J8
END
-* Define Something new
DEFINE SOMETHING/A1V=
IF CLUBMEMBERS.CLUBMEMBERS.VALUE EQ 1 THEN '1' ELSE
IF J8.CLUBSWITCHES.VALUE EQ '2' THEN '2' ELSE
'3';
END
TABLE FILE CLUBMEMBERS
PRINT SOMETHING
WHERE SOMETHING EQ &PARAM
This message has been edited. Last edited by: Kerry,
Originally posted by susannah: and if you're comparing to a value (rather than a field), use IF , not WHERE. wicked faster. IF LUCY GT 1 WHERE LUCY GT RICKY
Susannah, I found your note intriguing, so I thought I would try it. I alternated using IF and WHERE with the following filters on about 630k records and a runtime around 30 sec.
WHERE RCRAPP4_EMAIL_ADDRESS GE 'P'
WHERE RCRAPP4_EMAIL_ADDRESS LT 'Q'
WHERE RCRAPP4_P_EMAIL_ADDRESS GE 'P'
WHERE RCRAPP4_P_EMAIL_ADDRESS LT 'Q'
My original data source is an Oracle database, so after going against that and seeing nothing interesting, I held the data to a Focus file and then ran the same filters again. In my limited tests, the WHERE statement came out slightly ahead. . . So now I'm curious whether there are more unique circumstances where a gain in performance can be realized?This message has been edited. Last edited by: MathematicalRob,
WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.
Posts: 88 | Location: MI | Registered: July 23, 2009
I wonder how you measure this. A big part of the time between the start of the processing and getting the result might be consumed by processing the result to the screen, the webbrowser you use, the memory of the pc and several other circumstances. I am not sure if there is a real prove of sussanahs statement other then the many many years of experience she has.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
has zero to do with experience has to do with definition. IF invokes a simple process WHERE invokes a bucketload of stuff; ibi will explain it to you. its definitional, not empirical.
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I have a little timing routine that I wrap around my production reports so I can log runtime, so I pressed that into service for my crude attempt at experimentation.
Didn't mean to be difficult; I just like fast code, so I thought I'd try it out since I've always ignored "IF". . .
Thanks again! Rob
WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.
Posts: 88 | Location: MI | Registered: July 23, 2009