Compaq COBOL AAQ2G1FTK User Manual

Page 33

Advertising
background image

Developing Compaq COBOL Programs

1.1 Compaq COBOL and Alpha Architecture System Resources

Check program sizes. Larger amounts of system resources are used during
compilation for large monolithic source files. It is possible that your
application is already composed of several separately compiled program
units (different PROGRAM IDs not nested), but all in the same .COB. On
Alpha systems with Compaq COBOL, compilation performance improves if
you split the program units into separate (smaller) .COB files (possibly one
for each separately compiled program unit).

Note

Large arrays (tables) can have a significant impact on compile time and
resource requirements. In addition to the size of the program source, you
should also examine the amount of space allocated in your Data Division,
particularly for arrays. The number of array elements as well as the
size of the array elements is significant. This impact can be minimized
in two ways: by system tuning (as suggested in this section), which
will optimize system resources for the compile, and by using INITIALIZE
instead of VALUE in your data definitions, which will improve compilation
performance.

1.1.2 Tuning OpenVMS Alpha for Large Compaq COBOL Compiles

The recommendations that follow were determined by compiling one set of very
large Compaq COBOL modules on OpenVMS Alpha. While your results may
vary, the principles are generally applicable. For more detailed information
on OpenVMS Alpha tuning, see the OpenVMS System Manager’s Manual,
particularly the sections on Managing System Parameters and Managing System
Page, Swap, and Dump Files
.

Note that many tuning exercises are more beneficial if you work with a relatively
quiet system, submit batch jobs, and retain the log files for later analysis.

1.1.2.1 Optimizing Virtual Memory Usage

If your system does not have enough virtual memory allocated, the compile may
fail, with the ‘‘%LIB-E-INSVIRMEM, insufficient virtual memory’’ error reported.

OpenVMS has two parameters that control the amount of virtual
memory available to a process. One is the system generation parameter
VIRTUALPAGECNT, which sets an upper bound on the number of pagelets
of virtual memory for any process in the system. The other control is the
AUTHORIZE parameter PGFLQUOTA, which determines the number of pagelets
a process can reserve in the system’s page file(s).

After an ‘‘insufficient virtual memory’’ error, you can issue the DCL command
$SHOW PROCESS/ACCOUNTING to see the ‘‘Peak virtual size’’ used by the
process (or look at the ‘‘Peak page file size’’ at the end of a batch job log file).
If the peak size is at the system generation parameter VIRTUALPAGECNT,
you will need to raise this value. If the peak size is below VIRTUALPAGECNT,
and at or above PGFLQUOTA, run AUTHORIZE to increase PGFLQUOTA for
the COBOL users. (Peak size can exceed PGFLQUOTA because some virtual
memory, such as read-only image code, is not allocated page file space.)

It is difficult to predict precisely how much virtual memory will be required
for a compilation, but a starting point for system tuning may be computed by
multiplying 250 times the size of the largest program in disk blocks (including all

Developing Compaq COBOL Programs 1–3

Advertising