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.
TABLE FILE EDUCFILE PRINT EMP_ID ON TABLE HOLD END DEFINE FILE EMPLOYEE WANTED/I1 = DECODE EMP_ID(HOLD ELSE 1); END TABLE FILE EMPLOYEE PRINT EMP_ID LAST_NAME FIRST_NAME COMPUTE WHERE WANTED NE 1 ; END
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
sometimes its easier (for me, anyway)to take a less elegant approach and define some flags. See if some variant of this might work: DEFINE FILE myfile FLAG1/I1=IF FIELD1 IS value1 THEN 1 ELSE 0; FLAG2/I2=IF FIELD2 IS (myholdfile) THEN 1 ELSE 0; then maybe FLAG3/I2=FLAG1+FLAG3; END TABLE FILE myfile IF FLAG3 NE 0 ... makes it easy to test each filter component incrementally, e.g. just to make sure your holdfile is readable and that filter alone is working ok.
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Susannah I would also get the same error using a file within a DEFINE using that syntax. I only use a file within a WHERE/IF now. Am I doing something wrong?
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
Here's an example using the CAR file which shows using a file name in a define or in a where clause: ---------------------------------------------------------- DEFINE FILE CAR CNT/I5SC = 1; END -* TABLE FILE CAR SUM CNT BY COUNTRY WHERE COUNTRY IN ('ITALY', 'JAPAN') ON TABLE HOLD END -* TABLE FILE HOLD PRINT COUNTRY ON TABLE HOLD AS HLD_COU END -****************************************** TABLE FILE CAR SUM CNT BY CAR WHERE CAR IN ('JAGUAR', 'AUDI') ON TABLE HOLD END -* TABLE FILE HOLD PRINT CAR ON TABLE HOLD AS HLD_CAR END -****************************************** DEFINE FILE CAR CHK_COU/I1 = DECODE COUNTRY (HLD_COU ELSE 1); CHK_CAR/I1 = DECODE CAR (HLD_CAR ELSE 1); END -* TABLE FILE CAR PRINT CAR CHK_COU CHK_CAR BY COUNTRY WHERE (CHK_COU EQ 0) OR (CHK_CAR EQ 0) WHERE (COUNTRY IN FILE HLD_COU) OR (CAR IN FILE HLD_CAR) END --------------------------------------------------------------------- Jim
WF DevStu 5.2.6/WF Srv 5.2.4/Win NT 5.2
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005
I could possibly be missing the point here, but if it is just a single column of data that is no more than a certain size - I forget the exact limit, you can do something along the following lines:
Assume you have a file seats.dat with the following data: 2 4 6
FILEDEF SITZ DISK seats.dat -RUN DEFINE FILE CAR ASEATS/A6 = EDIT(SEATS,'$$9'); END -* TABLE FILE CAR PRINT ASEATS SEATS MODEL WHERE ASEATS EQ '(SITZ)' END
I don't think you are missing anything really. Jim was showing, nicely, different approaches to screening from a file. You can use IF ASEATS EQ (SITZ) - no quotes and not a WHERE. But if you use a WHERE, necessary for compound conditions, then the syntax is WHERE ASEATS IN FILE SITZ;
This file can be circa 16k for WHERE and 32k for IF.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007