COBOL Manual for TNS/E Programs (H06.03+)
Executing and Debugging HP COBOL Programs
HP COBOL Manual for TNS/E Programs—520347-003
25-15
Before Execution
Before Execution
To have an ordinary HP COBOL program (as opposed to one that is a Pathway server)
enter debugging mode before executing any instructions, start it with the RUND
command instead of the RUN command. Use the same options that you would use
with the RUN command (see Executing an HP COBOL Program).
To have a Pathway server enter debugging mode before executing any instructions,
use the PATHCOM command SET SERVER DEBUG ON. For considerations
regarding errors that can occur when you are debugging a Pathway server, see the
TS/MP Pathsend and Server Programming Manual.
Programmatically
To cause a program to put itself into debugging mode, put this statement at the point in
the program where you want to start debugging:
ENTER "DEBUG"
The process prompts you for debugging commands at its home terminal.
Forcefully
To force an HP COBOL program to enter debugging mode while it is executing, use the
TACL command DEBUG. If you do not have a TACL prompt on your terminal (because
you are not running the HP COBOL program in the background), press Break to get a
TACL prompt. If you include the TERM option in the RUN command with which you
start your program, you can debug the program from a terminal other than the one the
program is running on.
If the HP COBOL program is a Pathway server process, you can use the TACL
DEBUG command only from a terminal that is connected to a command interpreter, not
from a terminal that is configured to run a SCREEN COBOL terminal program. The
reason is that you must be able to tell the debugger which process to debug. For
considerations regarding errors that can occur when you are debugging a Pathway
server, see the TS/MP Pathsend and Server Programming Manual.
Note. If you press Break too soon after you start a process, you get the messages:
WARNING - STARTUP MESSAGE NOT READ
ABENDED: nn,nnn
followed by a TACL prompt. The process that you started was not able to complete its
initialization and was terminated.










