COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
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
You can achieve the same result with one command, OBEY PREP2, by putting these commands in
an OBEY command file named PREP2:
ADD DEFINE =BIGCUST, FILE \NICE.$FRNC.SIGNIF.CUST
ASSIGN PROG1.NEWFILE,&
\NICE.$FRNC.SIGNIF.NEWFILE,&
EXT 5, CODE 101, EXCLUSIVE
PARAM NONSTOP OFF
PARAM INSPECT ON
PARAM EXECUTION-LOG \NICE.$FRNC.SIGNIF.ERRMSG
PARAM PRINTER-CONTROL THE-PRINTER
PARAM SWITCH-1 ON, SWITCH-2 ON
An equivalent command sequence with the PARAM commands combined is:
ADD DEFINE =BIGCUST, FILE \NICE.$FRNC.SIGNIF.CUST
ASSIGN PROG1.NEWFILE,&
\NICE.$FRNC.SIGNIF.NEWFILE,&
EXT 5, CODE 101, EXCLUSIVE
PARAM NONSTOP OFF, INSPECT ON, SWITCH-1 ON, SWITCH-2 ON,&
EXECUTION-LOG \NICE.$FRNC.SIGNIF.ERRMSG,&
PRINTER-CONTROL THE-PRINTER
NOTE: The maximum number of DEFINES, ASSIGN commands, and PARAM commands that
can be active at one time depends on the amount of memory allocated to the TACL command
interpreter. For more information, see the TACL Reference Manual.
Finding Out What Preparation Commands Are Already Active
To find out if any DEFINEs are active, use this TACL command:
INFO DEFINE =*
To find out the characteristics of a DEFINE that you know is active, such as DEFINE FILE
$BEA.LEACH.HYER, use either of these commands:
824 Executing and Debugging HP COBOL Programs










