Compare (search) columns
There are three Compare Columns process options:
- CMPCOLM
- Applies to both the new and old files, or search file
- CMPCOLMN
- Applies to the new file
- CMPCOLMO
- Applies to the old file
These options compare (or search) the data between column limits of the input files (or search file). Up to 15 compare ranges or individual columns are allowed and may be entered on additional CMPCOLM, CMPCOLMN, or CMPCOLMO statements. All specified ranges of columns must be in ascending order.
Compare Types: LINE and WORD CMPCOLM is also valid for Search.
Notes:
- Some process options (SEQ, NOSEQ, and COBOL) also specify columns. The CMPCOLM, CMPCOLMN, CMPCOLMO process statements override all these process options.
- CMPCOLM, CMPCOLMN, CMPCOLMO cannot be used for WORD compare type or Search if the input contains a mixture of DBCS and non-DBCS data.
- start_column
- The starting column number to be compared or searched.
- end_column
- The ending column number of the range of columns to be compared or searched. (Must be separated from the start_column by a colon.)
Example | Description |
---|---|
|
Compare columns 25 through 75 in both files (or search columns 25 through 75 in the search file). |
|
Compare columns 30 through 60 and column 75 in both files (or search columns 30 through 60 and column 75 in the search file). |
|
Compare columns 48 through 54 in the new file. |
|
Compare column 87 in the old file. |
|
Compare columns 17 through 22 in the new file with columns 15 through 20 in the old file. |
Note: Small CMPCOLM values sometimes lead to false matches.
For details, see How SuperC corrects false matches.