COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Another way to find syntax errors in your program is with the FIXERRS macro, which requires that
you compile your program with the ERRORFILE directive. For more information about the FIXERRS
macro, see FIXERRS Macro (page 700). For more information about the ERRORFILE directive, see
ERRORFILE (page 549).
Specifying Subvolumes to Be Searched for Unqualified Files
In your HP COBOL source program, an unqualified file is a file whose name does not contain a
volume and subvolume. It can be a source file (as in a COPY statement) or an object file (as in an
ENTER statement).
Two DEFINEs allow you to specify one or more subvolumes for the compiler to search for unqualified
files:
• =_SOURCE_SEARCH (for unqualified source files)
• =_OBJECT_SEARCH (for unqualified object files)
These DEFINEs have CLASS attribute SEARCH. Use them by entering ADD DEFINE commands
before compiling your program, as in this example. (An ampersand at the end of a line means
that the TACL command continues on the next line.)
91> ADD DEFINE =_SOURCE_SEARCH, CLASS SEARCH, SUBVOL0&
91> (=_DEFAULTS,$VOL1.SUB2,$VOL1.SUB3)
92> ADD DEFINE =_OBJECT_SEARCH, CLASS SEARCH, SUBVOL0&
92> (=_DEFAULTS,$VOL2.SUB1,$VOL2.SUB2)
93> ECOBOL /IN XYZ, OUT $SPX/ XYZOBJ
In the preceding example, the compiler will search for unqualified source files on the default
subvolume first, then on $VOL1.SUB2, and finally on $VOL1.SUB3. The compiler will search for
unqualified object files on the default subvolume first, then on $VOL2.SUB1, and finally on
$VOL2.SUB2.
Suppose that you want to add the subvolume $VOL3.SUB1 to the _SOURCE_SEARCH list. Use an
ADD DEFINE command whose SUBVOLn parameter has n greater than 0 (the value of n in the
preceding example):
94> ADD DEFINE =_SOURCE_SEARCH, CLASS SEARCH, SUBVOL1&
94> ($VOL3.SUB1)
Now the compiler will search for unqualified source files on these subvolumes in this order: default
subvolume, $VOL1.SUB2, $VOL1.SUB3, $VOL3.SUB1.
Changing the Compilation Environment
You can change these aspects of the compilation environment:
• Volume(s) for Temporary Files
• Compiler Space Allocation
Volume(s) for Temporary Files
By default, the compiler creates its temporary files on the current default volume. If called by the
compiler, the supporting processes and the linker create their temporary files on the current default
volume.
The PARAM SWAPVOL command specifies the volume on which the compiler and its processes
will create temporary files (if possible). It does not determine where the operating system creates
the compiler’s own swap file—the Kernel-Managed Swap Facility (KMSF) does that. For more
information, see the Kernel-Managed Swap Facility (KMSF) Manual.
If you have given the command PARAM SWAPVOL and decide that you do not want it, you can
clear it with the CLEAR command before running the compiler; for example:
756 Creating and Compiling HP COBOL Source Programs










