COBOL Manual for TNS/E Programs (H06.03+)

Executing and Debugging HP COBOL Programs
HP COBOL Manual for TNS/E Programs520347-003
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 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
Diagnostic Messages
When a run-time error occurs, the run-time routine that detects it sends a run-time
diagnostic message to the default output device. The default output device is the home
terminal unless you changed it with the PARAM EXECUTION-LOG command (see
Specifying a Default Input-Output Device) or the OUT option of the RUN command
(see Specifying Default Input and Output Devices).