Working with the Hierarchy View


Code Insights presents a Hierarchy view tab when Open Program Hierarchy or Open Copybook Hierarchy is selected for a resource in an online BMC mainframe project as described in Updating-the-Project-Hierarchy. The Hierarchy view can show either a program hierarchy or a copybook hierarchy, depending on which was selected from Project Explorer. The program hierarchy can show the programs called by the selected program or the programs that call the selected program. Likewise, the copybook hierarchy can show the copybooks referenced in the selected copybook or the copybooks that reference the selected copybook. Items in the Hierarchy view can be expanded to show subsequent items nested below.

Programs are indicated by the image2021-4-16_16-26-15.pngprogram icon, and copybooks are indicated by the image2021-4-16_16-26-32.png copybook icon. If a recursive program call exists in the project, it is indicated by the image2021-4-16_16-26-59.pngrecursive program icon, and if recursive copybook inclusion exists in the project, it is indicated by the image2021-4-16_16-28-3.pngrecursive copybook icon.
The table adjacent to the hierarchy provides details about the individual program calls or copybook includes in the Hierarchy view and can be used to open a selected resource and position to the line identified.

The table adjacent to the hierarchy provides details about the individual program calls or copybook includes in the Hierarchy view and can be used to open a selected resource and position to the line identified.

Note

The code problems presented in the Problems view are the result of running Code Insights for each specific program analyzed. The reported code problems are not the same as compiler diagnostics and do not replace them. If you wish to see the compiler diagnostics for your program, see Submitting Compiles and Displaying Compile Diagnostics.

Viewing Program Hierarchy

  1. Ensure the online mainframe project has been analyzed as described in Updating-the-Project-Hierarchy.
  2. Right-click a program in Project Explorer and select Open Program Hierarchy. The Hierarchy view appears, showing the program members called by the selected program. The type, name, and location of the calling program are listed at the top of the view. The calling program is shown at the top of the hierarchy, and called programs are shown indented below with the dataset listed next to each program member name. If a resource did not exist in the project when it was analyzed, Not Found is shown next to the name.

    Note

    For PL/I procedures that are internal to a program, Internal procedure in program is shown next to the name, where program is the name of the program in which the procedure is defined.

  3. Called programs can be expanded to show deeper levels within the call hierarchy. Click the arrow next to the called program. If the called program calls other programs, they are shown indented below. If there are no called programs, the arrow disappears. If there is a recursive call, the recursive program icon is displayed and the expansion arrow is not shown.
  4. Click a called program to show Line, Reference, and Calling Procedure/Paragraph information for that program in the adjacent table.
  5. Double-click any program in the Hierarchy view to open it and position to the first line, or double-click a table entry to open the program and position to the line of the call.
  6. To switch the view to show members that call the selected program, click the image2021-4-16_17-9-46.png Show Called By Hierarchy button. To switch back to the initial view, click the image2021-4-16_17-10-18.png Show Calls Hierarchy button.

    Note

    The most recent selection of the Show Called By Hierarchy button or the Show Calls Hierarchy button remains in effect for subsequent Open Program Hierarchy or Open Copybook Hierarchy requests for other members.

Viewing Copybook Hierarchy

  1. Ensure the online mainframe project has been analyzed as described in Updating-the-Project-Hierarchy.
  2. Right-click a program or copybook in Project Explorer and select Open Copybook Hierarchy.

    Note

    Only copybooks referenced by a program in the project are analyzed. If the selected copybook is not referenced, or the project source has not been analyzed, an Online Project is not indexed message appears. Clicking Yes will execute (or re-execute) the Code Insights, but does not guarantee the selected copybook will be analyzed. If there are no programs in the project that reference the copybook, the same message will reappear after the analysis is complete. To ensure the copybook will be analyzed, you must add a program that references it to the online project.

  3. The Hierarchy view appears, showing the copybook members referenced by the selected program or copybook. The type, name, and location of the referring program or copybook are listed at the top of the view. The selected program or copybook is shown at the top of the hierarchy, and referenced copybooks are shown indented below with the dataset listed next to each copybook name. If a resource did not exist in the project when it was analyzed, Not Found is shown next to the name.

    Note

    For PL/I procedures that are internal to a program, Internal procedure in program is shown next to the name, where the program is the name of the program in which the procedure is defined.

  4. Referenced copybooks can be expanded to show deeper levels within the copybook hierarchy if they exist. Click the arrow next to the referenced copybook. If the referenced copybook references other copybooks, they are shown indented below. If there are no copybooks referenced, the arrow disappears. If there is a recursive include, the recursive copybook icon is displayed and the expansion arrow is not shown.
  5. Click a referenced copybook to show Line, Reference, and Referring Procedure/Paragraph information for that copybook in the adjacent table.
  6. Double-click any copybook in the Hierarchy view to open it and position it to the first line. If viewing the copybook hierarchy for a program, double-click a table entry to open the program and position to the selected include.
  7. To switch the view to show programs or copybooks that include the selected copybook, click the image2021-4-16_17-9-46.pngShow Included by Hierarchy button. To switch back to the initial view, click the image2021-4-16_17-10-18.pngShow Includes Hierarchy button.

    Note

    The most recent selection of the Show Included By Hierarchy button or the Show Includes Hierarchy button remains in effect for subsequent Open Program Hierarchy or Open Copybook Hierarchy requests for other members.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*