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.
Note: - 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.
.-,-------------------------------.
V |
>>-+-CMPCOLM--+----start_column--+---------------+-+-----------><
+-CMPCOLMN-+ '-:--end_column-'
'-CMPCOLMO-'
- 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
- CMPCOLM 25:75
- Compare columns 25 through 75 in both files
(or search columns 25 through 75 in the search file).
- CMPCOLM 30:60,75
- Compare columns 30 through 60 and column 75 in both files
(or search columns 30 through 60 and column 75 in the search file).
- CMPCOLMN 48:54
- Compare columns 48 through 54 in the new file.
- CMPCOLMO 87
- Compare column 87 in the old file.
- CMPCOLMN 17:22CMPCOLMO 15:20
- Compare columns 17 through 22 in the new file with
columns 15 through 20 in the old file.