LOCATE—Locate a Line
The LOCATE primary command allows you to scroll up or down to a specified line. The line then appears as the first line on the panel. There are two forms of LOCATE: specific and generic.
Syntax
- label
- A previously assigned label.
- linenum
- An edit line number. If that line number exists, it appears at
the top. If the line number does not exist, the line with the next
lower number appears at the top of the data area.
The linenum operand is a numeric value of up to 8 digits. You do not need to type leading zeros. If the operand contains 6 or fewer digits, it refers to the number in the line command field to the left of each line. If linenum contains 7 or 8 digits, it refers to the sequence numbers in the data records. For NUMBER ON STD, the editor refers to the modification flag. For NUMBER OFF, it refers to the ordinal line number (first=1, fifth=5, and so on). For NUMBER ON COBOL, it refers to the number in the line command field, which is the data sequence number. See Sequence number format and modification level for more information.
- FIRST
- Searches from the first line, proceeding forward.
- LAST
- Searches from the last line, proceeding backward.
- NEXT
- Searches from the first line of the page displayed, proceeding forward.
- PREV
- Searches from the first line of the page displayed, proceeding backward.
- CHANGE
- Searches for a line with a change flag (
==CHG>
). - COMMAND
- Searches for a line with a pending line command.
- ERROR
- Searches for a line with an error flag (
==ERR>
). - EXCLUDED
- Searches for an excluded line.
- LABEL
- Searches for a line with a label.
- SPECIAL
- Searches for a special non-data (temporary) line:
- Bounds line flagged as
=BNDS>
- Column identification lines flagged as
=COLS>
- Information lines flagged as
======
- Mask lines flagged as
=MASK>
- Message lines flagged as
==MSG>
- Note lines flagged as
=NOTE=
- Profile lines flagged as
=PROF>
- Tabs line flagged as
=TABS>
- Bounds line flagged as
- INFOLINE
- Searches for information lines flagged with
======
- MSGLINE
- Searches for message lines flagged with
==MSG>
- NOTELINE
- Searches for note lines flagged with
=NOTE=
- labela, labelb
- Labels identifying the start and end of the group of lines to
be searched.
For more information about using labels to identify a group of lines, see Labels and line ranges.
Examples
LOCATE SPE
==ERR>
), type: LOCATE ERR FIRST
LOC NEXT LABEL
LOC X .START .END
L FIRST .E .S X
LOCATE FIRST MSGLINE