Finding and Locating Data
Related topics
Both the FIND and LOCATE commands can be used on the Source Listing (2.L) screen. However, the commands function differently and have different effects on the system. Choosing the most efficient command for a task can ensure the best use of the system.
The LOCATE command helps you locate data faster and more efficiently. It provides a way to locate specific listing areas such as the procedure division, the working storage section, or the cross-reference sections. LOCATE provides abbreviations that allow you to locate these areas and allow you to position at either the top or bottom of any listing area. LOCATE is much faster to use because it utilizes the listing file’s internal index to locate data names and paragraphs.
The FIND command must sequentially process each line of the listing. Use this command to find multiple occurrences of a data name. FIND can also find data names when only part of the data name is known, such as entering FIND HOURS to find WA-HOURS.
FIND positions the cursor to a data name on the Variable Storage screen (2.3). FIND only functions within the data name portion of the screen. The following command searches for WA-HOURS:
If WA-HOURS occurs in multiple data names such as WA-HOURS-TODAY and YESTERDAYS-WA-HOURS, then use the RFIND command to find the next occurrence of WA-HOURS.