You are on page 1of 2

cobtest - a debugging tool

cobtest is a debugging tool that can be used interactively or in batch

when testing programs using vs cobol ii. to invoke cobtest type:

cobrun progx sysin progx data d debug

(where progx is the name of the cobol program and progx data d

is the data file)

following are some of the most commonly used and most useful cobtest

commands:

go - executes the program from the current statement

quit - exits from cobtest and returns to cms

help or help command - displays a full screen help facility for all

commands or a specific command

trace name print - a trace will be produced in the output file listing

each paragraph name as it is executed

flow on - begins a trace which contains the statement number of the

first statement in each paragraph that is executed

flow(n) - lists the last 'n' statements produced by the flow on command

where - displays the current statement number

step n - executes 'n' statements from the current statement


at n - sets a breakpoint at statement number 'n' so that execution of

the program will stop at this statement before it is executed.

list can then be used to display field values and go or step can be

used to start execution again.

off n - removes a breakpoint from statement number 'n' that was set by

an 'at n' command

list field-name - displays the current contents of a cobol 'field-name'

with its level, format, length and whether or not it contains valid

data

set field-name = value - assigns the 'value' to the cobol 'field-name'

restart - reloads and restarts the program

You might also like