The Elastic COBOL IDE allows the user to track references for COBOL identifiers and paragraphs.
Simply right click on the word in the COBOL editor and select the References popup menu option. This will give the sub menu options of WorkSpace/ Project/Program/Workset. These sub options will be enabled if the word is a valid identifier/paragraph. Refer Fig(1).
The first three sub options decide how wide the search will be when looking up references.
The WorkSpace option encloses all COBOL projects and programs in the currently open workspace.
The project options allows the user the option to select one or more COBOL projects that will be scanned. Refer Fig(2).
The program option allows the user to narrow the scan to one or more programs. Refer Fig(3).
Note that closed projects will not be included in any of the scan options.
The Workset option allows the user to select an earlier selection made using the Project/Program options. Thus the user can directly provide the set of projects or programs to be included in the search without having to specify them every time.
Once the search begins the output will be displayed in the Search view. If the view is closed it will be opened automatically.
The output is shown in a tree format grouped by project / program / source file / line match/s. Refer Fig(4).
The reference lookup will show every possible use of the word including copy-replace occurrences. The Elastic COBOL IDE uses the following logic in looking up references. Firstly it determines whether the current source of the referenced word is a main source file or a copy book. It uses that information to find all programs that use this source file. Next for each of the programs identified in the previous step, it locates the source file which defines the reference lookup word . It then extracts all the programs that make use of each definition source file. This final list of programs gets scanned for the referenced word. The final list gets filtered based on project/program selection.