Locates a string and displays the section of code where it
occurs.
![Read syntax diagram](./c.gif)
>>-+--------+--+--------+--+-----+--⁄--string--+---+-----------><
'-Locate-' '-window-' '- - -' '-⁄-'
- window
- A Disassembly window.
Select by a Window Specification or by placing the cursor in the window.
If omitted, and the cursor is not in a Disassembly window,
uses the first Disassembly window.
- -
- Search direction is up, rather than down.
- string
- The string to be searched for.
Include the trailing delimiter "/" when the string
has trailing blanks.
Format is essentially the same as the XEDIT LOCATE command.
The search begins at the first source line shown on the
screen; the target code, if found, is displayed at the top of
the screen.
Examples
loc /procedure
loc -/end;
l /declare /
/init(
/first use/
-/gobackward
loc =3 /window 3/
Return codes
- 0
- Operation successful
- 1
- Missing search string
- 6
- No extract data files containing source code were loaded with
LANGUAGE LOAD.