The LAST command locates the last occurrence of a string of characters. The search begins with the last line and processes backward. The LAST command applies to certain components (see Notes). When editing a report definition, working data, or parameter definition, LAST applies only to the field name.
Use the COLUMNS operand or the SET EDIT BOUNDS command to restrict the search to an inclusive range of columns. LAST can also locate a specific number of occurrences. You can use the ERROR operand to locate statements marked as errors by the compiler in a procedure definition.
This command has the following format:
[1 ] [/string/]
LAST [n ] [ERROR ]
[ALL]
[COLUMNS start‑column [MAX ]]
[ [end‑column]]
The maximum number of occurrences of the string to find. The default is 1. Specifying 1 positions the last line containing the string at the top of the region with subsequent lines filling the region. Specify ALL to locate all occurrences of the string. If you specify ALL or any value greater than 1, only the lines containing the string display. Use scrolling commands or function keys to view all occurrences if the display exceeds the size of the region.
The character that delimits the search string. You must use the same character consistently in a command. You can use any special character except the currently defined command delimiter (installed default is a semicolon (;)) or comment character (installed default is a colon (:)), an asterisk (*), an at sign (@), a pound sign (#), or a dollar sign ($).
A character or string of characters to find. If you do not specify a string, the string specified on the previous FIND, INCLUDE, EXCLUDE, FIRST, NEXT, PREVIOUS, or LAST command is used as a default value.
The string cannot include the string delimiter character or the current command delimiter.
Locates a line that the compiler marked as an error (using the MEL=YES operand of the COMPILE command and SET EDIT HIGHLIGHT ERRORS). You cannot specify column ranges.
The column where the search for the string begins.
The column where the search for the string ends.
Default. The furthest right‑hand column.
Note: The LAST command applies to the components listed below. Default column boundaries for each component are also listed.
|
|
Column Edited |
Column Boundaries |
|---|---|---|
|
Member |
Data area |
1‑72 |
|
Report |
|
|
|
Detail |
Field name |
1‑25 |
|
Heading |
Field name |
1‑56 |
|
Column |
Field name |
1‑25 |
|
Program |
|
|
|
Procedure |
Data area |
1‑72 |
|
Parameter |
Field name |
1‑19 |
|
Working data |
Field name |
1‑19 |
|
Dataview |
|
|
|
Field |
Field name |
1‑19 |
|
Key (VSAM) |
Field name |
1‑32 |
|
Plan |
|
|
|
DBRM |
DBRM |
1‑8 |
|
Resource |
Program name |
1‑8 |
If you use the n operand to search for all occurrences or any number of occurrences greater than 1, LAST displays only those lines containing the string. You can use the following commands without changing this display:
FIND, FIRST, LAST, NEXT, or PREVIOUS (where n > 1) IGNORE SCROLL
The use of any command other than those listed above replaces this display with a display showing the lines of data in sequence.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|