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.
This returns no records when I run it against my datamart but runs perfectly when I run it against the CAR database with approriate field name changes. What am I missing?
TABLE FILE DIST_DM BY CATEGORY_DESC WHERE CATEGORY_DESC CONTAINS 'C'; ON TABLE HOLD AS 'CHECK1' END
TABLE FILE DIST_DM PRINT DIST_DM.DIM_DIST_PARENT.DIST_PARENT_NAME BY CATEGORY_DESC WHERE CATEGORY_DESC IN FILE 'CHECK1'; ENDThis message has been edited. Last edited by: <Kathryn Henning>,
TABLE FILE DIST_DM
SUM
CATEGORY_DESC
BY CATEGORY_DESC NOPRINT
WHERE CATEGORY_DESC CONTAINS 'C';
ON TABLE HOLD AS CHECK1
ON TABLE SET HOLDLIST PRINTONLY
END
TABLE FILE DIST_DM
PRINT
DIST_DM.DIM_DIST_PARENT.DIST_PARENT_NAME
BY CATEGORY_DESC
WHERE CATEGORY_DESC IN FILE CHECK1;
END
This, of course, will return results only if you have CATEGORY_DESC rows that contain "C"...
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Changing your statement to the following will give you a little more breathing room but it too has its limits. IF CATEGORY_DESC IS (CHECK1)
For IF, the total of all files can be up to 32,767 literals, including new line and other formatting characters. Lower limits apply to fixed sequential and other non-relational data sources.
WebFocus 7.7.03 - 7703_hotfix - Gen: 284 Dev Studio 7.7.03 - Gen: 06062011 Mainframe Focus 7.7.03 Windows WF Client Server zOS Reporting server (hub-sub config) Windows Reporting server Windows RC Client Server
Posts: 30 | Location: Portland, Oregon, USA | Registered: September 11, 2009
This one is going to drive me to drink. It's not the number of items in the file as I picked "C" to reduce it to 3 hits. Something about the WHERE is not working. It runs fine but returns 0 hits.
Sorry that I have not explained the entire situation very well. I was trying to pull the selected catagories from a different file. I was not able to get that to work so I switched it to the same file so I could figure out what I was doing wrong. It is not a size issue. I've tabled the file and the selected catagories are there as expected. I pulled this code from a report I wrote last year that runs against a cube and it works perfectly. Thanks for everyone's suggestions.
I took a the info straight from the Creating Reports With WebFOCUS Language 7.6.10 manual, page 182 & 183 (in that manual, page 219 & 220 in the 7.7.02 manual). The synax is:
IF fieldname operator (file)
I used check1 because that is what was in the code above, but it can be whatever the hold file is you are referencing.
Here is some sample code using PERSINFO and EMPDATA:
TABLE FILE PERSINFO
SUM
PIN
BY PIN NOPRINT
IF STATE EQ 'NY'
ON TABLE HOLD AS LST1
ON TABLE SET HOLDLIST PRINTONLY
END
TABLE FILE EMPDATA
PRINT
FIRSTNAME
LASTNAME
DEPT
SALARY
IF PIN IS (LST1)
END
One thing to note is that if you are using a variable length text field (i.e. A30V) the dynamic list lookup does not get passed. But if you format the field on the fly to A30 it will. Just add the /A30 or whatever the length is of your field after the printed field.
TABLE FILE DIST_DM
SUM
CATEGORY_DESC/A30
BY CATEGORY_DESC NOPRINT
WHERE CATEGORY_DESC CONTAINS 'C';
ON TABLE HOLD AS CHECK1
ON TABLE SET HOLDLIST PRINTONLY
END
WebFocus 7.7.03 - 7703_hotfix - Gen: 284 Dev Studio 7.7.03 - Gen: 06062011 Mainframe Focus 7.7.03 Windows WF Client Server zOS Reporting server (hub-sub config) Windows Reporting server Windows RC Client Server
Posts: 30 | Location: Portland, Oregon, USA | Registered: September 11, 2009
unfortunately I currently have no access to CAR, PERSINFO etc. right now. ( due to migrations )
I've tested it with our own database. I've got it. It doesn't seem to work with 'numbers'. We use HOLD FORMAT ALPHA to fix this.
But with TRACEON I can see the exact same SQL generated by both: • IF MYFIELD IS (LST1) • WHERE MYFIELD IN FILE LST1
both hitting the buffer limit at the same point. (FOC1400) SQLCODE IS 302 (HEX: 0000012E) : CLI2: BADBUFRQ(302): Invalid buffer size.
i.e. as the help states: _____________________________________________________ Choosing a Filtering Method
There are two phrases for selecting records: WHERE and IF. It is recommended that you use WHERE to select records. IF offers a subset of the functionality of WHERE. Everything that you can accomplish with IF, you can also accomplish with WHERE. WHERE can accomplish things that IF cannot.
If you used IF to select records in the past, remember that WHERE and IF are two different phrases, and may require different syntax to achieve the same result.
WHERE syntax is described and illustrated throughout this topic. For details on IF syntax, see Selecting Records Using IF Phrases. _____________________________________________________
Hence my amazement when it was stated that IF could handle up to 32,767 literals.
Only thing is I do remember someone mentioning IF is handled by the ReportingServer ( as in : don't use this, it's less efficient, let de DBMS do the crunching ). But my TRACE contradicts this.
...and I've heard WF8 has a solution for this.
_____________________ WF: 8.0.0.9 > going 8.2.0.5
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010
It was the variable lenght. I'm not familiar with it. When I defined the category as an a100 and used the define variable rather than the field name it works perfectly. Thank to everyone as this one had me completley stumped.
But with TRACEON I can see the exact same SQL generated by both:• IF MYFIELD IS (LST1)• WHERE MYFIELD IN FILE LST1
The "32K values" capability applies when the Focus engine is applying the filter to a local data source (e.g., reporting against local Focus files). When the filter criterion is to be passed (via generated SQL) to and applied by a database server, either way it is expressed as a WHERE ... IN clause and the limitations imposed by that server apply.
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005