COBOL Manual for TNS and TNS/R Programs

Executing and Debugging HP COBOL Programs
HP COBOL Manual for TNS and TNS/R Programs522555-006
25-13
Running the New Process in the Background
RUNNAMED Directive
If you compile your program with the RUNNAMED directive, the operating environment
assigns it a timestamp process name when you execute it. You do not need to include
the NAME option in the RUN command (but you can, if you want to give it a specific
name).
The RUNNAMED directive works for the NMCOBOL compiler only if the RUNNABLE
directive is active.
Running the New Process in the Background
By default, your TACL process suspends itself while your HP COBOL program
executes. You can prevent this by running your program in the background with the
NOWAIT option of the RUN command.
Beware of using the NOWAIT option if your program has ACCEPT and DISPLAY
statements that use the home terminal. With NOWAIT, your HP COBOL program
cannot accept input from, or display output to, the home terminal until you pause the
terminal. Without NOWAIT, you can access your TACL process by pressing Break
when you are certain that the COBOL-created process is done with the home terminal.
This command runs the program PROG1 in the background:
PROG1 /NOWAIT/
Run-Time Errors
Run-time errors are errors that arise during the execution of a process. Examples of
their causes are:
The process tries to open a nonexistent file.
The process tries to open a file that is inaccessible because another process has it
open exclusively.
The process tries to call a non-COBOL program that is not in the process’s own
loadfile, the system library, or the TNS or user library.
Topics:
Diagnostic Messages
Error-Handling Procedures