COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
25 Executing and Debugging HP COBOL Programs
NOTE: This section applies to the Guardian environment. If you are compiling HP COBOL
programs in the OSS environment, see Running HP COBOL Programs (page 712).
After you have compiled and bound your program, you can execute and, if necessary, debug it.
Preparing to Execute an HP COBOL Program
If your program has certain characteristics, or if you want certain things from a particular execution
of your program, you must prepare appropriately before you execute your program.
Table 111 Conditions Requiring Pre-Execution Preparation
Preparation Required Before Program ExecutionCondition
Add DEFINEs that have those DEFINE names (see Adding
DEFINEs).
Program assigns HP COBOL file names to DEFINE
names.
Override those assignments (see Overriding File Assignments
Made at Compilation Time).
Program assigns HP COBOL file names to system file
names and you want to override those assignments.
Specify their characteristics (see Specifying Characteristics of
Files That a Program Creates).
Program creates some of the files it uses and you want
to specify their characteristics.
Override the NONSTOP directive (see Overriding the
NONSTOP Directive).
Program was compiled with a NONSTOP directive that
you want to override.
Specify the default input-output device that you want (see
Specifying a Default Input-Output Device).
You do not want your home terminal to be the default
input-output device.
Specify this preference (see Providing for an Unavailable
Printer).
You want the operating environment to return control
to your program if a certain printer is unavailable or
out of paper.
Turn on switches (see Turning On External Switches).Program declares external switches in the
SPECIAL-NAMES paragraph and you want some of
them to be ON when your program begins to execute.
Specify this preference (see Requesting a Debugger Instead
of ABEND).
You want the program to call a debugger, rather than
ABEND, after printing any fatal error messages.
Specify this preference (see Specifying Waited Input-Output).You want the program to do all of its input-output in
wait mode.
Put each set of preparation commands into an OBEY command
file and execute the appropriate OBEY command file (see
Using OBEY Files to Prepare for Execution).
You want to establish one or more sets of preparation
commands for your program and put a set into effect
with a single command.
Find out what these commands are (see Finding Out What
Preparation Commands Are Already Active).
You want to know what preparation commands are
already active.
Clear commands (see Changing or Clearing Unwanted
Preparation Commands).
You want to change or clear active preparation
commands.
Preparation commands stay active until you override them, clear them, or end your TACL session.
Adding DEFINEs
If your program assigns COBOL file names to DEFINE names, you must add DEFINEs that have
those DEFINE names before executing your program. You add a DEFINE with the TACL command
ADD DEFINE. Before you can add DEFINEs, you must set your TACL process DEFMODE attribute
to ON (the default is OFF) with the TACL command:
SET DEFMODE ON
820 Executing and Debugging HP COBOL Programs










