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-7
Specifying Waited Input-Output
Specifying Waited Input-Output
To cause your HP COBOL program to do all its input-output in the wait mode, execute
the command PARAM WAITED-IO ON before you execute the program. For more
information, see PARAM Command.
Using OBEY Files to Prepare for Execution
If you expect to have to enter the same set of preparation commands repeatedly, you
can save time by putting those commands in an OBEY command file. You can create
an OBEY command file with an HP editor (see the example in Running the Compiler).
Suppose that you almost always need to execute these preparation commands before
executing your program, PROG1, so you put them into an OBEY command file named
PREP1:
ADD DEFINE =BIGCUST, FILE \AKRON.$SLB.MAJ.ACC
ASSIGN PROG1.NEWFILE,&
\AKRON.$SLB.MAJ.NEWFILE,&
EXT 5, CODE 101, EXCLUSIVE
PARAM NONSTOP OFF
PARAM INSPECT ON
PARAM EXECUTION-LOG \AKRON.$SLB.MAJ.ERRMSG
PARAM PRINTER-CONTROL THE-PRINTER
PARAM SWITCH-1 ON, SWITCH-2 ON
Then you can execute all of the preceding commands with the single command:
OBEY PREP1
Suppose that you occasionally want to execute PROG1 with the file
\NICE.$FRNC.SIGNIF.CUST in place of the file \AKRON.$SLB.MAJ.ACC, have
PROG1 create the file \NICE.$FRNC.SIGNIF.NEWFILE instead of the file
\AKRON.$SLB.MAJ.NEWFILE, and send run-time library routine messages to the file
\NICE.$FRNC.SIGNIF.ERRMSG instead of the file \AKRON.$SLB.MAJ.ERRMSG. You
can put these commands in an OBEY command file named PREP1A:
DELETE DEFINE =BIGCUST
ADD DEFINE =BIGCUST, FILE \NICE.$FRNC.SIGNIF.CUST
ASSIGN PROG1.NEWFILE,&
\NICE.$FRNC.SIGNIF.NEWFILE,&
EXT 5, CODE 101, EXCLUSIVE
PARAM EXECUTION-LOG \NICE.$FRNC.SIGNIF.ERRMSG
Then you can execute the commands in PREP1 (some of which you still want) and
override them with the commands in PREP1A with this command series:
OBEY PREP1
OBEY PREP1A