Use the SYNCKEY keyword with the COMPARE command to identify positions within the OLD and NEW files that are used to synchronize records. Synchronizing records entails finding the newfile record's key that shares the same oldfile key as defined by the SYNCKEY keywords. Matching SYNCKEYs are flagged as either MATCHED or CHANGED. Non-matching SYNCKEY records are flagged as either INSERTED or DELETED. Use SYNCKEY when comparing sequential files or PDS members.
When you specify the NOKEY parameter, the data identified by the SYNCKEY position is used to synchronize records within the old and new files. This is called a non-keyed compare. NOKEY is the default. The print parameter defaults to NOPRINT for this type of compare.
When you specify the ASCENDING or DESCENDING parameter, SYNCKEY is used to identify positions that are considered keys in ordered OLD and NEW files. This is called a keyed compare. The files must be sorted in ascending or descending order on the part of the record identified by the SYNCKEY keyword. PRINT is the default for a keyed compare.
You can specify multiple SYNCKEY keywords on the COMPARE command. The following rules apply for multiple SYNCKEY keywords:
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|