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 need an array or set-like variable to check membership of values. This seems simple enough but I have not found this information in the documentation, on forums and through web searches.
Example:
Instead of
WHERE MYTABLE.COUNTRY IN ('AU', 'NZ', 'TH', 'ZA');
I want to set up something re-usable like
-SET &COUNTRIES = ('AU', 'NZ', 'TH', 'ZA');
to use as
WHERE MYTABLE.COUNTRY IN &COUNTRIES;
I have tried various other approaches, including concatenated strings, without success.
How can this be done in WebFocus?This message has been edited. Last edited by: FP Mod Chuck,
More than likely the last two posts will solve your issue, but you said you haven't had any success. With how you have it currently are you getting an error? Just curious on the details surrounding the issue.
JC WebFOCUS Dev Studio / App Studio 8.2.01 Windows 7
Thanks for all your answers. Both jfr99's/MartinY's and Dave's methods are working for me.
I should probably look more into how WebFocus treats quotes.
@MartinY/Dave - no HTML parameters involved, the list will be hardcoded.
@BabakNYC - the reason I want to use a variable is that my list of countries is actually much longer, used in several places and it may need updating from time to time. A variable will keep the code shorter and easier to maintain.
@jcannavo - the only error message I got with the original, incorrect syntax was "EDA no data".
You can also put your values in a file and then use ...
WHERE COUNTRY IN FILE HLD_CNTRY or WHERE NOT COUNTRY IN FILE HLD_CNTRY
Here's an example ...
TABLE FILE CAR SUM COUNTRY BY COUNTRY NOPRINT WHERE COUNTRY IN ('ENGLAND','ITALY') ON TABLE SET PRINTONLY ON ON TABLE HOLD AS HLD_CNTRY END -* TABLE FILE HLD_CNTRY HEADING " VALUES IN HLD_CNTRY " " " PRINT * END -* TABLE FILE CAR HEADING " WHERE COUNTRY IN FILE HLD_CNTRY " " " PRINT CAR BY COUNTRY WHERE COUNTRY IN FILE HLD_CNTRY END -* TABLE FILE CAR HEADING " WHERE NOT COUNTRY IN FILE HLD_CNTRY " " " PRINT CAR BY COUNTRY WHERE NOT COUNTRY IN FILE HLD_CNTRY END
WebFocus 8.201M, Windows, App Studio
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008