Focal Point
MATCH FILE : OLD-NOR-NEW

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

June 19, 2008, 03:08 PM
Sayed
MATCH FILE : OLD-NOR-NEW
Hello,

MATCH FILE SKF00165
PRINT
PAYMENT_TOK
BY
PAYMENT_TOK NOPRINT
RUN
FILE SKF0413
PRINT
PAYMENT_TOK2 ITEM_TOK
BY
PAYMENT_TOK2 NOPRINT
AFTER MATCH HOLD OLD-AND-NEW
END



--------Output for above code---------------
PAGE 1

PAYMENT_TOK PAYMENT_TOK2 ITEM_TOK
1170580 1170580 324288
1194319 1194319 330112
1222530 1222530 275850
1269911 1269911 100567
1280930 1280930 353722
1280948 1280948 353740
1296086 1296086 101500
1317890 1317890 362255
1350911 1350911 5824
1370088 1370088 20330
-------------------------------

-*Then I want to get the difference

MATCH FILE HOLD
PRINT
ITEM_TOK
BY
ITEM_TOK NOPRINT
RUN
FILE HAULER_STATEMENTS
PRINT
CHECK_NUMBER
BY
CHECK_NUMBER NOPRINT
AFTER MATCH HOLD OLD-NOR-NEW
END


--------Output for above code---------------
PAGE 1

ITEM_TOK CHECK_NUMBER
5824 5824
20330 20330
36583 36583
100567 100567
101500 101500
275850 275850
289161 289161
324288 324288
330112 330112
353722 353722
-------------------------------


As you can see, on the second output I am not getting the NOR relationship. What am I doing wrong?

Thanks,
Sayed


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
June 19, 2008, 03:45 PM
j.gross
For starters, the BY fields should have the same name (the referenced FIELDNAME, or the AS name if specified) and similar formats. Otherwise the internal matrices are sorted as specified, but the match is simply on row-number within the two matrices, ignoring the sort-key values.

To see what I mean, remove the NOPRINT, and use OLD-OR-NEW, to see what old and new keys are being paired.


- Jack Gross
WF through 8.1.05
June 19, 2008, 04:02 PM
Sayed
Jack,

Thank you!

This solved what I was trying to achieve.


MATCH FILE SKF00165
PRINT
PAYMENT_TOK
BY
PAYMENT_TOK AS MYPAYMENT NOPRINT
RUN
FILE SKF0413
PRINT
PAYMENT_TOK2 ITEM_TOK
BY
PAYMENT_TOK2 AS MYPAYMENT NOPRINT

AFTER MATCH HOLD OLD-AND-NEW
END


MATCH FILE HOLD
PRINT
ITEM_TOK
BY
ITEM_TOK AS MYCHECK NOPRINT
RUN
FILE HAULER_STATEMENTS
PRINT
CHECK_NUMBER
BY
CHECK_NUMBER AS MYCHECK NOPRINT
AFTER MATCH HOLD OLD-NOR-NEW
END


Thanks,
Sayed


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE