z/OS ISPF User's Guide Vol II
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Compare lines

z/OS ISPF User's Guide Vol II
SC19-3628-00

The CMPLINE process statement compares two files (or search) between line limits. The statement may be specified on one complete line or may have separate CMPLINE statements for each of the six keyword operands: TOP, BTM, NTOP, NBTM, OTOP, and OBTM. The reference values may be line numbers or data strings.

Compare Types: LINE, WORD, and Search

Note: Keyword operands OTOP and OBTM are invalid for Search.
Read syntax diagramSkip visual syntax diagram
            .-----------------------------------.   
            V                                   |   
>>-CMPLINE----+-TOP--+--+-line number---------+-+--------------><
              +-NTOP-+  '-| String operands |-'     
              +-OTOP-+                              
              +-BTM--+                              
              +-NBTM-+                              
              '-OBTM-'                              

String operands

|--,--'--search_string--'--+-------------------------------------------+--|
                           '-,--start_column--+----------------------+-'   
                                              '-:--last_start_column-'     

keyword
The keyword may have one of the following values:
TOP
Top. Defines the beginning line in the new (or search) file and old compare file. Means both NTOP and OTOP.
NTOP
New Top. Defines the beginning line in the new (or search) file.
OTOP
Old Top. Defines the beginning line in the old file.
BTM
Bottom. Defines the ending line in the new (or search) file and old compare file. Means both NBTM and OBTM.
NBTM
New Bottom. Defines the ending line in the new (or search) file.
OBTM
Old Bottom. Defines the ending line in the old compare file.
line number
The relative number of the record in the file.
search_string
A character or hexadecimal string enclosed within apostrophes. For one embedded apostrophe, use two consecutive apostrophes ('').
start_column
The column in or after which the search_string must start.
last_start_column
The last column in which the search_string may start. Must be separated from the start_column by a colon.
Example
Description
CMPLINE TOP 55 BTM 99
Compare from line 55 to line 99 in both files.
CMPLINE NTOP 55 NBTM 99
Compare from line 55 to line 99 in the new file.
CMPLINE NTOP 'ABCD',5:66
Compare from where "ABCD" starts within columns 5 to 66 in new file (that is, is found within columns 5 to 69).
CMPLINE OTOP 'ABCD'
Compare from where "ABCD" first found in old file.
CMPLINE TOP X'40E2',1:1
Compare from where " S" is found for both files.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014