COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
SELECT MAJORACCT
ASSIGN TO "\AKRON.$SLB.MAJ.ACC"
If you execute PROG1, when it opens MAJORACCT, the file it actually opens is
\AKRON.$SLB.MAJ.ACC.
If, when you execute the program, you want to redirect the assignment to a different file, you can
issue a command interpreter ASSIGN command such as
ASSIGN PROG1.MAJORACCT,\NICE.$FRNC.SIGNIF.CUST
and then run PROG1. When the COBOL program opens MAJORACCT, it opens the file
\NICE.$FRNC.SIGNIF.CUST.
If, however, the program had associated MAJORACCT with a define-name with a file-control entry
of the form
SELECT MAJORACCT
ASSIGN TO "=BIGGY"
then you would need to have a DEFINE named “=BIGGY” established at execution time; otherwise,
any OPEN statement would fail.
Controlling the Propagation of DEFINEs
You control whether or not the Guardian environment allows the creation and processing of
DEFINEs. Use the DEFMODE ON/OFF command to enable or disable DEFINE creation and
processing. Similarly, when one process starts another process, the creator can specify a DEFMODE
setting for the new process; if it does not specify one, the new process inherits the DEFMODE
setting of the creator.
DEFINE Names
Every DEFINE has a name. A name you give to a DEFINE must:
• Consist of at least 2 and no more than 24 characters
• Begin with an equals sign (=) followed by a letter
• Continue with any combination of letters, digits, hyphens (-), underscores (_), and carets (^).
HP has reserved the set of DEFINE names beginning with equals sign followed by underscore (_)
for future use.
Example 162 DEFINE Names
=A
=The_chosen_file
=Long--but-not-too-long
=The-File-of-The-Week
=X_-^-_-_-^-_-_-^
Uppercase and lowercase letters are equivalent in DEFINE names.
Wherever a DEFINE name can appear in the text of a COBOL source program, it must appear in
quotation marks. Wherever a DEFINE name appears in commands to the command interpreter,
such as on the command line that initiates a COBOL compilation, the DEFINE name must appear
without quotation marks.
DEFINE Attributes
The CLASS attribute determines which other attributes a DEFINE can have.
594 Program Execution










