Specifying a range
Labels allow you to specify a line or a range of lines on a primary command. You can specify two labels to define a range of lines to be processed on these commands:
CHANGE DELETE EXCLUDE
FIND LOCATE REPLACE
RESET SORT SUBMIT
CHANGE ALL 'TEST' 'FINAL' starts
at the first line of the data being edited and scans all lines up
to and including the last line, changing all occurrences of TEST to FINAL.CHANGE .ZCSR .ZLAST ALL 'TEST' 'FINAL' specifies
a range, and is thus interpreted differently. The command changes
only the last part of the data.CHANGE ALL " " "_" .A .A The
command in the previous example is interpreted as Change all blanks to underscores on the .A line.
The order in which you specify the labels is not important. The editor assumes that the line closer to the beginning of the data set is the first line of the range, and the line closer to the end of the data set is the last.
A common error when using a range is to assume that the search
begins at the first character of the line with the first label. Remember,
however, that the default is NEXT and that the search starts at the
cursor location. Lines outside the range are logically the same as
the TOP OF DATA and BOTTOM OF DATA lines.
Use the FIRST, LAST, or PREV operands to ensure that the search begins
within the range.