FOCUS - Match Command

Refer to your FOCUS documentation for complete information on using the commands below. To view a examples of report requests that use a match command, refer to Report Request:   FOC1520 and Report Request:   FOC1520

 

File
Command Syntax
Command Description

(OLD)

EX filename

Execute the standard defines for all files before matching.

 

MATCH FILE filename

Begin match syntax. Specify the smallest file as the OLD file.

 

VERB fieldname

When possible, use the verb: sum to get a 1-to-1 record match.

 

BY fieldname

At least one BY field must be used. ACROSS should not be used.

 

IF/WHERE screening

Screening statements apply only to the OLD file.

 

RUN

Terminates the request for the OLD file.

 

-*

Optional comment line to separate sections

(NEW)

FILE filename

Begins the match syntax for the NEW file.

 

VERB fieldname

When possible, use the verb: sum to get a 1-to-1 record match.

 

BY fieldname AS 'old sort fieldname'

Sort the data by the same field(s) in the OLD file and rename using 'AS'.

 

IF/WHERE screening

Screening statements apply only to the NEW file.

 

AFTER MATCH HOLD AS 'holdfile'
MERGE PHRASE

Place results of match into a temporary or permanent hold file and specify a match option (see chart below).

 

END

Ends the match request.

 

-*

Optional comment line to separate sections

(FINAL)   

TABLE FILE holdfile

Begins the table file request.

 

report request commands

Only the hold file fields are available for generating the final report.

 

END

Ends the table request.

 

Match Options:

 Match Option

Merge Phrase

DED00000004.gif

OLD
Keep ALL records from the OLD file and add in only matching records from the NEW file.

DED00000005.gif

NEW
Keep ALL records from the NEW file and add in only matching records from the OLD file.

DED00000006.gif

OLD-NOT-NEW
Keep records that appear only in the OLD file.

DED00000007.gif

NEW-NOT-OLD
Keep records that appear only in the NEW file.

DED00000008.gif

OLD-AND-NEW
Keep records only if they appear in both files.

DED00000009.gif

OLD-OR-NEW
Combine the two files. This is the default if the AFTER MATCH command is omitted.

DED00000010.gif

OLD-NOR-NEW
Keep ALL records from the OLD file which do not have a matching record in the NEW file and keep all records from the NEW file which do not have a matching record in the OLD file.

 

 

Last Updated: June 1, 2000