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.
Hello. Would anyone have an example of how FOC_NONE is used. I have the following and it is not working.
-*******SET clauses in the beginning of file*** -SET &DEPT = IF &DEPT EQ '' THEN 'FOC_NONE' ELSE '&DEPT'; -SET &COLL = IF &COLL EQ '' THEN 'FOC_NONE' ELSE '&COLL'; -SET &MAJOR = IF &MAJOR EQ '' THEN 'FOC_NONE' ELSE '&MAJOR'; -****end SET clauses
Then I have the following WHERE clauses:
-***WHERE clauses******* WHERE (COLLEGE EQ '&COLL'); WHERE (DEPARTMENT_DESC EQ '&DEPT'); WHERE (MAJOR EQ '&MAJOR'); -****end WHERE clauses****
I checked the 5.3 documentation and that didn't answer my question. Thanks,This message has been edited. Last edited by: <Kathryn Henning>,
You haven't to test your field against 'FOC_NONE' but you have to postfix your WHERE statement with it: -SET &TEST = 'T'; -SET &FN_TEXT = IF (&TEST EQ 'T') THEN 'FOC_NONE' ELSE '';
TABLE FILE CAR SUM DEALER_COST RETAIL_COST BY COUNTRY BY CAR BY MODEL
WHERE COUNTRY EQ 'ITALY' &FN_TEXT END -RUN
IF &TEST is eqaual to 'T' then &FN_TEXT is set to 'FOC_NONE' and ALL countries are displayed.
Setting &TEST to anything else, &FN_TEXT is empty and only cars with COUNTRY equal to ITALY are displayed.
WebFOCUS 7.6, 7.7 Windows, All Output formats
Posts: 90 | Location: Stuttgart | Registered: October 20, 2010
You really shouldn't need the postfix. This has always worked fine for me:
-SET &ECHO=ALL;
-* File phoenix02.fex
-SET &COUNTRY='FOC_NONE';
TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
BY COUNTRY
BY CAR
WHERE COUNTRY EQ '&COUNTRY';
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
if I try your method and leave the parm empty, I return all. But if I put a value in the parm, I return the filtered records
Right. If you want to use this method when passing parameters, then instead of -SET &COUNTRY='FOC_NONE'; use -DEFAULT &COUNTRY='FOC_NONE' Then, if you do not pass a parameter, WF will use FOC_NONE, otherwise WF will use whatever you passed.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
Originally posted by Rifaz: Reason Daniel suggested to use -SET instead of -DEFAULT is that, when you're passing parameters, -DEFAULT overrides its value, -SET won't.
What makes you think -DEFAULT overrides parameter values?
@phoenixfox: Looking at your code, that should just "work". Apparently you expect it to do something that it doesn't, so what did you expect to happen?
Or is your question specific to WF 5.3? In that case I wouldn't know, oldest I worked with was 7.6.8.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
That output is showing exactly the opposite of what you were claiming, doesn't it?: -DEFAULT sets a default value that you overrode with the parameter you passed with the procedure (result is 'SampleDEF'), while -SET overrides your input parameter (result is 'Test') regardless of what you passed along for that parameter.
Perhaps you meant to claim that "-DEFAULT lets you override parameters, while -SET won't"?
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
I know, IBI is going crazy over all the bug reports I opened :P
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
I tried all the suggestions to the best of my ability and poster BGronli's worked. It's junky but it works. I'll go with it until I learn how and when to use the other methods. Thanks, P
Let's EVALuate, simplify, and remove the junky stuff from this, as follows (Try commenting out one of the -SETs):
-* File phoenix02.fex
-SET &COUNTRY='FOC_NONE';
-SET &COUNTRY='ENGLAND';
TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
BY COUNTRY
WHERE COUNTRY EQ '&COUNTRY.EVAL';
END
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005