2 years ago

#38223

test-img

N Sastry

Microfocus animator says "perform level=01" even though the program it is presently in is a subprogram and called from another program

I am facing a problem while debugging a COBOL program, When using animator and when a call is made to another COBOL program with a CALL ... USING statement.

After entering the sub program and pressing P (for Perform) E (for Exit). The animator asks "Perform Level = 1 Zoom to calling program ?", and on pressing Y(for Yes) Animator shows the message "Perform Level 1", and doesn't proceed to the the next line in the calling program (i.e, MAIN.COB) .

The only option available then is to Zoom all along which is not helping much during debugging.

Is there a runtime Switch or a Compiler option to make animator pass the control back to the calling program

Example: This is the main program that iam debugging

IDENTIFICATION DIVISION.
PROGRAM-ID. MAIN.

DATA DIVISION.
   WORKING-STORAGE SECTION.
   01 WS-STUDENT-ID PIC 9(4) VALUE 1000.
   01 WS-STUDENT-NAME PIC A(15) VALUE 'Tim'.

PROCEDURE DIVISION.
   CALL 'UTIL' USING WS-STUDENT-ID, WS-STUDENT-NAME.
   DISPLAY 'Student Id : ' WS-STUDENT-ID
   DISPLAY 'Student Name : ' WS-STUDENT-NAME
STOP RUN.

This is the called program, UTIL,

IDENTIFICATION DIVISION.
PROGRAM-ID. UTIL.

DATA DIVISION.
   LINKAGE SECTION.
   01 LS-STUDENT-ID PIC 9(4).
   01 LS-STUDENT-NAME PIC A(15).

PROCEDURE DIVISION USING LS-STUDENT-ID, LS-STUDENT-NAME.
   DISPLAY 'In Called Program'.
   MOVE 1111 TO LS-STUDENT-ID.
EXIT PROGRAM.

So when iam debugging MAIN program, and pass control to UTIL subroutine (by Perform and Step ). when i try to return back to calling program MAIN, animator gives the message "Perform Level = 1 Zoom to calling program ? Y/N" - when i press Y is shows a message at lower left saying ""Perform Level = 1" and doesnt skip to the program MAIN

When we look at the Perform / Call stack ( by pressing P and V ) animator displays the below Stack view

Perform/Call Stack View-----------------------------------
Program Name                    Section Name
----------------------------------------------------------
UTIL.int                        No Section or Paragraph


---------------------------------------------------------
Zoon    Scroll <so on... >
---------------------------------------------------------

As you can see, only the Sub module is visible in the stack. Whereas it should have been.

Perform/Call Stack View-----------------------------------
Program Name                    Section Name
----------------------------------------------------------
UTIL.int                        No Section or Paragraph
MAIN.int                        No Section or Paragraph

---------------------------------------------------------
Zoon    Scroll <so on... >
---------------------------------------------------------

(i.e., The calling point from the MAIN.int should also be visible) This is why i suspect it has something to do with some missing compilation option or Environment settings

cobol

microfocus

0 Answers

Your Answer

Accepted video resources