COBOL Manual for TNS and TNS/R Programs
Executing and Debugging HP COBOL Programs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
25-4
Specifying Characteristics of Files That a Program
Creates
The number of ASSIGN commands the command interpreter can store is limited by the
amount of memory allocated to the command interpreter. The default amount of
memory allocated to the command interpreter is 8 pages, which accommodates up to
19 ASSIGN commands. To allocate more memory to the command interpreter, use the
MEM option in the RUN command that you use to run the command interpreter. Each
additional page of memory allocated to the command interpreter accommodates an
additional 19 ASSIGN commands.
Specifying Characteristics of Files That a Program Creates
If your program is to create a file, you can specify these characteristics of that file with
an ASSIGN command:
•
The actual file name with which the COBOL file name is to be associated
•
The size of the file (extent size)
•
A file code
•
An exclusion mode (EXCLUSIVE, SHARED, or PROTECTED) for reading and
writing (but it does not override any exclusion mode that the program explicitly
specifies)
The ASSIGN command Example 25-2 specifies that the file that the program calls
NEWFILE has the system file name \AKRON.$SLB.MAJ.NEWFILE, is allocated five
file pages, is an EDIT file (type 101), and EXCLUSIVE exclusion mode (unless the
OPEN statement that opens the file specifies a different exclusion mode).
You can also specify file characteristics with a DEFINE. For details on specifying file
characteristics with either the ASSIGN command or DEFINEs, see ASSIGN Command
and DEFINEs.
Enabling Debugging Declaratives
If your program has a DEBUGGING MODE clause and debugging declaratives, you
must execute the command PARAM DEBUG ON before executing your program, or
your program will not execute the procedures specified in its debugging declaratives.
The PARAM DEBUG ON command is:
PARAM DEBUG ON
For an explanation of debugging declaratives, see Debugging Declaratives.
Example 25-2. ASSIGN Command
ASSIGN PROG1.NEWFILE,
\AKRON.$SLB.MAJ.NEWFILE,
EXT 5,
CODE 101,
EXCLUSIVE