COBOL Manual for TNS/E Programs (H06.03+)

Creating and Compiling HP COBOL Source
Programs
HP COBOL Manual for TNS/E Programs520347-003
22-17
Changing the Compilation Environment
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 compilers 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:
94> PARAM SWAPVOL $COBVOL
95> CLEAR PARAM SWAPVOL
96> ECOBOL /IN XYZ, OUT $SPX/ XYZOBJ