HP OpenVMS Systemsask the wizard |
The Question is:
Topic: Performance enhancement of COBOL internal SORT processing.
We currently are attempting to remove SQL "order by" processing within
a called SQLMOD and replace it with a Cobol sort routine. Performance
tests appear to indicate that the processing time for both is nearly
equal (about 8 hours). I would like to attempt to improve sort pro-
cessing performance. I'm using the following sort structure (rows are
fetched directly from the Oracle Rdb database):
SORT SORT-OM-402-FILE
ASCENDING KEY SORT-OM-ORD-REGION-ID,
SORT-OM-ORD-LOCATION-ID,
SORT-OM-ORD-NUM
INPUT PROCEDURE IS 1500-GEN-OM-DATA
GIVING TMP-OM.
Note: Max sort file created are between 250-300,000 blocks
I've setup the sort so that SYS$SCRATCH points to one drive for
the SORT work files and another drive for TMP-OM in order to enhance
throughput. I was considering the use of the RESERVE qualifier on
the TMP-OM file but I was concerned with the increase in this param
since I believe it is similar to performing the SET RMS_DEF buffers
command which has caused me problems in the past (ie. %LIB-F-
INSVIRMEM-insufficient virtual memory). I was also considering
the use of additional sort work files, but not sure if this would help since
there is only 1 file being sorted and I'm not sure you can even do this
in an internal sort (ie. I know the DCL sort allows for it). Any insight
would be appreciated.
The Answer is :
If you have access to an OpenVMS Alpha V7.0 or later system, you
will want to measure the performance of this configuration with
Hypersort. DCL SORT/MERGE and COBOL SORT/MERGE can both use
Hypersort as described below.
$ help sort
SORT
The OpenVMS Sort/Merge utility sorts records or merges input
files. To sort one or more input files, specify the SORT command.
These files are sorted according to the fields you select and
one reordered output file is generated. To merge input files that
have previously been sorted according to the same key fields,
specify the MERGE command. One output file is generated.
High-Performance SORT/MERGE Utility:
On Alpha systems, you can also choose the high-performance
Sort/Merge utility. It uses the same command line interface.
Any differences are noted with the appropriate SORT and
MERGE qualifiers. Use the SORTSHR logical to select the high-
performance Sort/Merge utility. Define SORTSHR to point to the
high-performance sort executable in SYS$LIBRARY as follows:
$ DEFINE SORTSHR SYS$LIBRARY:HYPERSORT.EXE
To return to SORT/MERGE, deassign SORTSHR. (The SORT/MERGE
utility is the default if SORTSHR is not defined.)
|