Saturday 23 June 2012

LOCATE and FIND Commands in CONTROL-M


LOCATE Command


The LOCATE command can be used in all “directory type” screens that
contain scrollable data (for example, the Calendar List screen). The syntax of
the command is
LOCATE string
The string must be specified as is. It cannot contain blanks. Quotation marks
are not required.

The search proceeds from the top of the list to the first item in the list that
starts with the specified string. The cursor is positioned on the OPTION field
at the beginning of the line containing the string, if found, or on the OPTION
field of the alphabetically closest preceding value if the specified value is not
found.

FIND Command
The FIND command, and its abbreviation F, can be used in all screens that
contain scrollable data to find and display the next occurrence of a character
string. The syntax of the command is
FIND string [fromcol] [tocol] [PREV]
where:
• string is the search string
Mandatory.
• fromcol is the first column in the search range
Optional.
• tocol is the last column in the search range
Optional. Requires specification of a fromcol value.
• PREV is the indicator that the search must move backwards (instead of
forwards) from the current cursor position
Optional.

The FIND command supports lowercase, uppercase and mixed case
arguments (strings).
If the string contains blanks, enclose the string with apostrophes (‘single
quotes’) or quotation marks (“double quotes”). For example:
FIND ’WAIT SCHEDULE’


The search for the string proceeds from the current cursor position forward,
or backward if PREV is specified. If the string is found, the cursor is
positioned at the start of the string.
The column range searched can be limited by specifying fromcol and/or tocol
values.
To repeat the find, to the next and previous occurrence of the string, press
PF05/PF17.
Some screens enable the user to limit the number of lines searched by a
FIND command. This is discussed in the relevant screen descriptions.

No comments:

Post a Comment