Focal Point
comparing and combining files

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

January 24, 2007, 01:47 PM
FrankDutch
comparing and combining files
We have client data on different systems.
therefore the data entry departments want me to build a report that compares the several sources of data to be sure all the static data of each client is filled in as it should be.
We have a RMS database, an MsSQL system and some data in a sybase database.
I can build reports on all 3 and the do have one field in common (cltnr).

My question is how can I build one report that shows
from RMSdata from sybase from SQL
cltnr name address ....accman department....extra code.....

In some cases the sybase data is not filled, in some the sql and sometimes the RMS data is missing.
I can do this in two ways but witch one is the best.
1) first create 3 hold files HOLDSQL, HOLDRMS and HOLDSYB (format focus index cltnr)
2) create one extra hold file that combines the field "CLTNR" from all the 3 into a HOLDMAST
3) link the 4 files in an outer join from HOLDMAST.
4) build the report

The other way is create a master file, with all the expected fields and put all the data with modify into that focus file.

I'm not sure if the last one is the better, or if the first one is going to work at all.

what should you do.

thanks for the advice!




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

January 24, 2007, 02:11 PM
ET
How about using match file? This would eliminate your step2 (extra hold file) and having to join the hold files:

MATCH FILE SQLFILE
PRINT SQLFIELDS BY CLTNR
RUN
FILE RMSFILE
PRINT RMSFIELDS BY CLTNR
RUN
FILE SYBFILE
PRINT SYBFIELDS BY CLTNR
AFTER MATCH HOLD OLD-OR-NEW
END

Then just table the resultant hold file.

Good Luck

et


FOCUS 7.6 MVS PDF,HTML,EXCEL
January 24, 2007, 02:15 PM
N.Selph
Assuming you have a hub server on Windows, connected to each database, you can do the whole thing in one fex, without creating the hold files or masters:
 
MATCH FILE rmstable
SUM various rmsfields
BY CLTNR
RUN 
MATCH FILE sybasetable
SUM various sybasefields
BY CLTNR
AFTER MATCH HOLD OLD-OR-NEW
RUN 
MATCH FILE mssqltable
SUM various mssql fields
BY CLNTR
AFTER MATCH HOLD OLD-OR-NEW
END
TABLE FILE HOLD
-etc




(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
January 24, 2007, 03:13 PM
FrankDutch
ok this sounds rather sympel, I will give it try.
thanks for this.
Is there a difference in the result in HOLD OLD-OR-NEW or OLD-AND-NEW?
Well, let me try both options...




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

January 24, 2007, 03:34 PM
ET
You want to use old-or-new. Old-and-new is like an inner join and you would get only those that are on all 3 files.


FOCUS 7.6 MVS PDF,HTML,EXCEL
January 30, 2007, 02:34 PM
FrankDutch
thanks for the supprt, it works well and it is in many cases a better way to combine data then the join function.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7