Using CSI with Visual COBOL

0 Likes
over 4 years ago

Problem:

How do I use COBOL Source Information (CSI) with Visual COBOL?

Resolution:

Overview

COBOL Source Information (CSI) is a well-established code analysis view of COBOL programs, and is available within Visual COBOL.

CSI displays information about programs based on queries and displays the results in the Micro Focus Code Analysis window.

CSI queries provide a wide range of information about a program, for example:

  • Where data items are defined, used, and modified.
  • Where paragraphs and sections are executed.
  • Which procedures a paragraph or section executes.
  • Where subprograms are called.
  • The copybook structure of a program.

Running CSI Queries 

There are a number of ways to run a CSI Query:

  • Click the Quick Browse button  on the COBOL toolbar.

    This invokes the CSI query control. A CSI query can be entered followed by Enter. In the example below the Special Query COPY has been entered:

    The query results are displayed in the Micro Focus Code Analysis window:

    There are a number of Special Queries that return a range of information about a program. Please refer to the product documentation for further details.

    In addition some of these Special Queries are available from the Micro Focus Code Analysis context menu.

    COBOL verbs and groups of verbs can also be typed into the CSI query control, for example to find all file operations: OPEN, CLOSE, READ, WRITE, DELETE, START, and REWRITE

    the key word I-O can be used:

  • Alt Q
    Placing the cursor on a data item and using the shortcut Alt Q, will return information about where the item is defined, referenced, modified etc.:


    Placing the cursor on a section or paragraph name and using the shortcut Alt Q, will return information about where the section is executed from, what it executes and any data items used:
  • Context menu
    Right click to invoke the context menu after placing the cursor on a section or paragraph name or data item etc.:

Micro Focus Code Analysis window

There are a number of different operations that can be performed from Micro Focus Code Analysis Window:

Run a previous query - select a report from the list box to run it again.

Rerun a query - Rerun a query.

Hide copybooks from the report – exclude results for copybooks, toggle to show the details for all files listed in a report (includes copybooks).

Hide the details from the report – show / hide report details. Right-click and select Expand All / Collapse All.

Navigate to the code - Double-click on a line in the window to navigate to that line in the source code in the editor.

Arrange the results - Toggle between arranging the results - Group By Program or Group By Rule.

Toggle highlighting of results in the code – show / hide highlighting in source code.

Copy lines from the report - highlight and copy results to the clipboard.

 

 

Comment List
Anonymous
Related Discussions
Recommended