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