How to: Reference: |
The way MATCH merges data depends on the order in which you name data sources in the request, the BY fields, display commands, and the merge phrases you use. In general, however, processing is as follows:
MATCH logic depends on the concept of old and new data sources. Old refers to the first data source named in the request, and new refers to the second data source. The result of each merge creates a HOLD file until the END command is encountered.
The following diagram illustrates the general merge process:
AFTER MATCH HOLD [AS 'name'] mergetype
where:
Specifies the name of the extract data source created by the MATCH command. The default is HOLD.
Specifies how the retrieved records from the files are to be compared.
The results of each phrase are graphically represented using Venn diagrams. In the diagrams, the left circle represents the old data source, the right circle represents the new data source, and the shaded areas represent the data that is written to the HOLD file.
OLD-OR-NEW specifies that all records from both the old data source and the new data source appear in the HOLD file. This is the default if the AFTER MATCH line is omitted.
OLD-AND-NEW specifies that records that appear in both the old and new data sources appear in the HOLD file. (The intersection of the sets.)
OLD-NOT-NEW specifies that records that appear only in the old data source appear in the HOLD file.
NEW-NOT-OLD specifies that records that appear only in the new data source appear in the HOLD file.
OLD-NOR-NEW specifies that only records that are in the old data source but not in the new data source, or in the new data source but not in the old, appear in the HOLD file (the complete set of non-matching records from both data sources).
OLD specifies that all records from the old data source, and any matching records from the new data source, are merged into the HOLD file.
NEW specifies that all records from the new data source, and any matching records from the old data source, are merged into the HOLD file.
WebFOCUS |