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 two tables with a one to many relationship. For explanation purposes, let's say the primary table is CLAIM and the related table with multiple related records is CHARACTERISTIC. I need to work with a recordset that includes all CLAIM records that do NOT have a particular characteristic.
While I suspect the solution will involve mutliple steps, I haven't had any luck working with HOLD files. In any event, no matter how I think about it, I find myself needing to perform some sort of join that would return only those CLAIM records that do NOT have a match in the other table.
My limited experience is making this a tough nut to crack, though I expect the solution will turn out to be simple.
I think your best bet is to use the MATCH command in this case. It is well described in the FOCUS manual. This command will easily get you the records that appear in your first file without any corresponding records in the second. Here is a sample syntax from the manual:
MATCH FILE EMPLOYEE SUM LAST_NAME BY EMP_ID RUN FILE EDUCFILE SUM COURSE_CODE BY EMP_ID AFTER MATCH HOLD OLD‑NOT‑NEW END
This syntax will yield the relationship you want.
Posts: 44 | Location: New York City | Registered: May 23, 2004
Match works with hold files as well. You want to ensure you get only those without the data, so a request might look as follows Note does not exclude multiple records necessarily, a proof of concept. I used the write to reduce to one record per key.
join.... table file xyz where code eq 'abc' print code by key on table hold as hold1 end -*hold1 has all key records which have the child table file xyz where code ne 'abc' write code by key on table hold as hold2 end -*hold2 has all the records not the child match file hold2 write code by key run file hold1 write code by key after match hold as hold3 old-not-new end -* hold3 has all the records in hold2 not in hold1 table file hold3 print code by key end
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
Jonathan, read up on SET ALL = PASS, SET ALL=ON and SET ALL = OFF in (which manual? i can't find it) You'll do your join SET ALL = PASS JOIN field in CLAIM TO ALL field IN CHARACTERISTIC AS J!1 then your filters, or screening statements, will be on the characteritic, which is in the GUEST file, not the host. The setting ALL=PASS allows you to filter on the GUEST file. You don't use it if you're filtering on the HOST file. IBI's Renee Teatro gives a great presentation on this subject, if you can arrange to get a copy, or see her at summit.
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
You have discovered that there are 2 MATCH commands in Focus. One is used in MODIFY and MAINTAIN to maintain Focus databases. But the other is used in the reporting environment. It is extremely useful, and is more of a MATCH/MERGE where data can be thought of as being merged horizontally, rather than vertically.
HTH, Suzy
Posts: 124 | Location: Lebanon, New Hampshire | Registered: April 24, 2003
The problem that you are encountering is that there are multiple characteristics and you are looking for something that isn't there. Whether JOIN or MATCH, they work better when we are looking for something specific. In this case, if you go to the JOIN file and say show me anything that is NE 'ABC', and a particular claim has ABC and DEF, he will still show up on the report. So, here is my suggestion. First, create a HOLD file of the CLAIMS that do not have that characteristic (no matter how many characteristics they do have. DEFINE FILE CHAR FLAG/I5 = IF CHARACTERISTIC EQ '&VALUE' THEN 1 ELSE 0; END TABLE FILE CHAR WRITE FLAG NOPRINT BY CLAIM_NO WHERE TOTAL FLAG EQ 0 ON TABLE HOLD AS WHO_I_WANT END
JOIN CLAIM_NO IN WHO_I_WANT TO CLAIM_NO IN CLAIMS AS JOIN1 END TABLE FILE WHO_I_WNAT PRINT claiminformation END
(Faster if you can create that HOLD file in the same format as CLAIM (ie HOLD FORMAT DB2 ,etc.)
Alternatively, if there are not a lot of claims, HOLD AS WHOIWANT FORMAT ALPHA Then, TABLE FILE CLAIM PRINT Claiminformation WHERE CLAIM_ID IN FILE WHOIWANT END
Posts: 60 | Location: 2 penn | Registered: May 22, 2003