Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want a detailed line-by-line log of the COBOL program 2

Status
Not open for further replies.

spoteboy

Programmer
Aug 10, 2011
1
0
0
CA
Hi, COBOL Gurus,

I would like to know how to instruct my COBOL program to produce a detailed log that has every statement of the COBOL program in the order that they are executed. The program has 193 performs and I want to see the order of execution.

I am running on an IBM mainframe. Here is the EXEC statement from the JCL.

EXEC COBMCBG,CPARM='NOSOURCE',REGION.GO=0M .

Any help would be greatly appreciated.
 

I use this for trouble shooting purposes:
Put a Display statement at the beginning of each paragraph.
Code:
100-SETUP.
    DISPLAY '100A '.
    [i]Code follows.  
    Additional DISPLAY statements can be used as necessary.
    more code
    more code
    DISPLAY '100B '.
    more code
    etc[/i]
    DISPLAY '100Z '.
100-EXIT.
    EXIT.

Randy
 
READY TRACE at the beginning of he program will list the names of the paragraphs ase they are entered. I know of no way to trace the statements.
 
You might try asking if your shop has a profiler tool available. Not very likely. Tended to be expensive and typically underused. Can't remember the name of the last one I encountered. That was in the previous century, so who knows if it's still around. Think it was a Computer Associates ("CA") product.

But a combination of webrabbit's and Randy700's suggestions is usually all you really need.

Code what you mean,
and mean what you code!
But by all means post your code!

Razalas
 
Ask your seniors or system support people if there are any tools already installed.

One such product is Xpeditor (From Computer Associates, iirc). Another is the IBM debugger. Another is ASG-SMARTTEST frm ASG.

If your code runs thousands (or millions) of iterations, suggest you termntage the trace or display test after only a few records. Of course if the code goes into a perpetual loop, it needs to be canceled as quickly as possible.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top