![]() |
COMP Compare
? The parameter mask for the compare function is displayed. The parameter ? is only relevant when entering the COMP command in the command line of CFS, and must always be the last entered.
Notes:
The comparison log will normally be saved to a file with the name CFS.COMPLIST. tsn.yymmdd.hhmmss. The user can choose any name for the comparison log, by issuing a FILE command with the link name COMPLIST before the comparison (/FILE file,LINK= COMPLIST).
If the user selects the name of the comparison log by means of the File command, then all successive comparison logs will be written to this file. This remains valid until a /REL COMPLIST command is issued.
Large tape files can also be compared with the Compare command, although only a 1 to 1 comparison without synchronisation is possible (S=N). The two tape files must first be assigned with file commands, e.g. /FILE name1,LINK=C1,STATE= FOREIGN,FCBT=SAM,RECFORM=.,RECSIZE=.., BLKSIZE=..,VOLUME=..,DEVICE=..
The comparison of the two files, when using synchronisation (parameter S=Y), is carried out in virtual memory. The memory used is released again after the end of the comparison. For a simple 1 to 1 comparison without synchronisation (parameter S=N), no virtual memory is needed for working storage.
When comparing two large files, a check should first always be made for a sorted field (ascending or descending) which could be used for synchronisation. Using a synchronisation field will minimise both the memory and processor requirements. The following notes are only relevant if no synchronisation fields exist for the comparison.
To reduce the virtual memory requirement for particularly large files, the parameter F= (Compare-Fields) can be used to restrict the column range over which the comparison will be performed.
When comparing particularly large files, or when the files contain many differences, setting the parameters SA, SL, and SR accurately is of particular importance to perform the comparison within an acceptable time.
A practical method of reducing the computing load when comparing two very different files is to set the value for the parameter SA (number of synchronisation attempts) to a small positive value. To achieve acceptable comparison results, the parameter SR (number of matching records for a synchronisation point) should be set concurrently to a high value.
If the files to be compared contain many records, and if a conversion of records can be excluded from the beginning of file name1 to the end of file name2, i.e. if a record conversion can always be restricted locally, then the runtime of the comparison can be reduced by setting the SL parameter to the maximum expected search distance to find a synchronisation point.
An increased value for the SR parameter (number of matching records for a synchronisation point) generally leads to a "smoothed" comparison result. If, for example, the records 100 and 104 in a source file are modified, then setting SR=5 (Standard value) will result in the complete record range of 100 to 104 being flagged as different, even though this range also contains matching records.
The best comparison result will be achieved with the parameter values SA=0, SR=1, SL=0. The processing time required can quickly become extreme. A solution is to run the comparison from CFS in batch mode.
When comparing two libraries or file lists (name1),(name2) in RP=T3 mode (fully synchronised comparison log), the log can enlarge very quickly, and require large amounts of disk space. Before starting the comparison run it may be advisable to create a comparison log by means of a file command as follows: /FILE file,LINK= COMP LIST,SPACE=(300,300). After the comparison run is finished, release the link name COMPLIST (/REL COMPLIST).
File list Compare: If the file lists (name1),(name2) contain libraries of the same type (PLAM/LMS/FMS), then these will be compared at an element level. The libraries are not compared by PAM blocks. Multiple libraries can be compared in a single comparison run using this method.
Examples:
COMP LIBR.PLAM(-'R/'),LIBR.PLAM.OLD,RP=T3
All elements from the LIBR.PLAM library that are not type R (relocatable) are compared with the respective elements in the library LIBR.PLAM.OLD. The records that differ between the individual elements are listed in the comparison log with both record number and content (RP=T3). A maximum of 100 records are listed for each unequal record area (standard value: RP=L100).
COMP LIBR.PLAM,,F=H
All elements from the library LIBR.PLAM which exists in at least two versions are compared. The first version is compared with the second, the second with the third, and so on. The result of the comparison will produce a log in which the amendment history of each element will be documented.