Focal Point
[SOLVED] Match-merge

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/771106722

September 02, 2009, 07:01 AM
Ted Michalski
[SOLVED] Match-merge
I have two files. One named "DIST_RPT" that has all the data I need for a report including Account numbers. The other file is named "EXCLUDE_ACCOUNTS" that only has a list of Accounts that I want to exclude from the report. I am pretty new to WF and I am having trouble getting a resulting file that has all the data from DIST_RPT but excludes the rows with the Account numbers that are in EXCLUDE_ACCOUNTS. Can anyone help? Any suggestions would be appreciated. I looked in the Help manuals and they show the syntax for Match/Merge for merging files, but not how to 'Exclude' accounts from file 1 based on the accounts that are in file 2.

This message has been edited. Last edited by: Kerry,


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
September 02, 2009, 07:04 AM
<JG>
What format are the files?

There are many options for doing what you want.

Read up on JOIN, MATCH and WHERE (using NOT IN FILE)
September 02, 2009, 09:27 AM
GinnyJakes
If you use MATCH, use the OLD-NOT-NEW option. The WHERE field NOT IN FILE would also work well if you can stay within the byte limit. Multiply the length of the account number by the number of rows in the exclude file. It needs to be LE 16000 for a relational host and 32K for others.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
September 03, 2009, 12:49 AM
Prash1983
Use this:

MATCH FILE DIST_RPT
PRINT *
BY ANY_FIELD_VALUE
RUN
FILE EXCLUDE_ACCOUNTS
BY ANY_FIELD_VALUE(THIS SHUD BE SAME AS ABOVE)
AFTER MATCH HOLD AS HOLD-FILE-NAME OLD-NOT-NEW
END
-RUN


webFOCUS 7.6.x,
z/OS(Mainframes),
Excel and HTML
September 03, 2009, 01:56 AM
Danny-SRL
Ted,

Again, what are the formats of the files? FOCUS? RDBMS? FLAT? other?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

September 03, 2009, 06:25 AM
Ted Michalski
I have the solution. Thanks for your help.


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
September 03, 2009, 07:07 AM
GamP
Ted,
Would you care to share your solution with us?
A lot of people are thinking along with you and trying to help you, and it is somewhat disappointing to only read that it is solved. How? Did our suggestion help in any way? Or did you do things differently?
We can always learn from someone else's experiences.
And if the problem is really solved, please update the topic to indicate that.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988