Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Matching - not what it's cracked up to be

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Matching - not what it's cracked up to be
 Login/Join
 
Platinum Member
posted
Either that (subject line), or I just don't understand how to use it. I found it to be really frustrating, but here's my problem.

I have 2 tables.....RPRARSC with 964 ID's (based on selection critera) and RPRAWRD with 11,195 ID's. Now, most of RPRARSC's ID's are in RPRAWRD, so I want to select all of the ID's that exist in RPRARSC and NOT in RPRAWRD. So I resort to matching. Here is my code.

MATCH FILE RPRARSC
  BY RPRARSC_PIDM
  WHERE RPRARSC_AIDY_CODE EQ '0607'
  WHERE RPRARSC_EST_AMT GT 0
RUN
FILE RPRAWRD
  BY RPRAWRD_PIDM
  WHERE RPRAWRD_AIDY_CODE EQ '0607'
  WHERE RPRAWRD_ACCEPT_AMT GT 0
AFTER MATCH HOLD OLD-NOT-NEW
END
  


When I run the report below based on this, I get a distinct count of 964. This is not the correct answer. I've tried different variations of the MATCHING wizard's merge phrases, but I still come up with the same number. I run this in SQL using the MINUS statement, and I get 354. I've also run this a few other ways and 354 is the correct distinct count.

TABLE FILE HOLD
SUM
     CNT.DST.RPRARSC_PIDM
ON TABLE NOTOTAL
END
  


I'd love to know what I am doing wrong with MATCH, even if there is a better way to do this, if it's possible.

Thanks,
Brian


-Brian

Webfocus v7.6.1 on Windows XP
 
Posts: 108 | Registered: June 19, 2006Report This Post
Virtuoso
posted Hide Post
Have you tried adding a print statement to the match,

Match...
print ...
by ...
run
file ...
print ...
by ....
after match hold as xyz old-not-new


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Platinum Member
posted Hide Post
You are not following the syntax correctly. Match file requires the by fields from each file to named the same and also have the same format. Assuming the formats are the same you need to us an as phrase for one of your by fields like this. If the formats are not the same then a Define is needed to one of the by fields to make them the same.

quote:
MATCH FILE RPRARSC
BY RPRARSC_PIDM
WHERE RPRARSC_AIDY_CODE EQ '0607'
WHERE RPRARSC_EST_AMT GT 0
RUN
FILE RPRAWRD
BY RPRAWRD_PIDM as RPRARSC_PIDM <================
WHERE RPRAWRD_AIDY_CODE EQ '0607'
WHERE RPRAWRD_ACCEPT_AMT GT 0
AFTER MATCH HOLD OLD-NOT-NEW
END


Good luck

et


FOCUS 7.6 MVS PDF,HTML,EXCEL
 
Posts: 115 | Location: Chicago, IL | Registered: May 28, 2004Report This Post
Platinum Member
posted Hide Post
ET, that worked great. Now I am getting the correct number. I appreciate your quick response. Also, thank's for the suggestion Leah. I did try that though.

Brian


-Brian

Webfocus v7.6.1 on Windows XP
 
Posts: 108 | Registered: June 19, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Matching - not what it's cracked up to be

Copyright © 1996-2020 Information Builders