COBOL Explorer example
The following is an example of how to use the COBOL Explorer feature of Fault Analyzer.
A fault entry for an abend in a COBOL program is analyzed interactively using the 'I' line command from the Fault Entry List display. The "Event Summary" is selected, and from there the COBOL program event is selected, resulting in the "Event Details" display shown in Sample COBOL Explorer Event Details display.
By selecting the "COBOL Explorer" point-and-shoot field shown at ❶, the "Source Line and Data Values" display in Sample COBOL Explorer Source Line and Data Values display is shown.
Because the data field "CC" at ❷ has been identified as the cause of the error (divide by zero), we want to look at this data field more closely. To do this, unselect the other two data fields ("BASE-AMOUNT" and "PRICE") by over-typing with blanks, and press Enter. The result is the display shown in Sample COBOL Explorer Debug View display.
The above Debug View display consists of a branch-analysis showing how the program got to the source line, and any source lines that reference the selected variable (or variables, if more than one had been selected from the previous Source Line and Data Values display).
This view shows that the abending source line 175 is in procedure CALC_TAX, and the branch analysis reveals the execution path to the source line.
In addition to selected variables, any references to containing group items or redefines are also shown. Any source lines that modify a reference are highlighted (often these are used to create a new view as variables that modify referenced variables might be of particular interest, use PF10/PF11 to scroll views).
You can select the following by placing the cursor on the appropriate line and pressing Enter (or just double-click, if you have selected the "Fnn" and "ENTER at cursor position" Personal Communications options available through Settings > Hotspots):
- Select any highlighted source line to create a new view.
- Select a DATA DIVISION section (for example, WORKING-STORAGE SECTION) to invoke the Associated Storage Areas display for that section (this shows all variables and their values). The FILE SECTION also allows you to edit/browse/view open files with ISPF or File Manager.
- Select a data item to show all references to it and the section/paragraph in which the reference occurs. For group items and group members, an aggregate map is also shown.
- Select a procedure name to show all branches to it and the procedure in which the branch occurs.
- Select an executable source line to show the value of its variables and optionally create a new view for that source line and selected variables. If the source line is a branch (for example, PERFORM, GO TO), the target procedure is expanded (subsequent collapse returns to the branch statement).
- Select an MQI call (MQOPEN/MQGET/MQPUT/MQCLOSE) to edit/browse the queue or list queue managers with File Manager WebSphere® MQ.
Section Expand/Collapse, by means of placing the cursor on the '+' or '-' signs on the left of the display and pressing Enter, is used to explore the program. Sections comprise FILE SECTION, WORKING-STORAGE SECTION and so on, plus any sections and paragraphs in the PROCEDURE DIVISION.
DATA DIVISION level 01 group items are initially collapsed. These can be expanded to show group members.
Expand the PROCEDURE DIVISION to reveal all procedures. These can then be expanded individually to show source.
- "Expand all" expands all sections and group items. (Note that this causes all source records to be searched when using the Find command.)
- "Collapse all" restores the view's initial display.
- "Comments" expands or collapses comment lines.
- "Level 88" expands or collapses level 88 items showing only the high-level item when collapsed.
- "Redefines" expands or collapses REDEFINES showing only the high-level item when collapsed.
View the video introducing COBOL Explorer at https://www.youtube.com/watch?v=ZXwsaBnfk2Q.