COBOL Manual for TNS and TNS/R Programs

Libraries and Utility Routines
HP COBOL Manual for TNS and TNS/R Programs522555-006
13-26
Establishing Parameters With =_SORT_DEFAULTS
DEFINE
For explanations of individual FastSort interface routines, see CBL85UTL and
ZCOBSRL Routines.
Establishing Parameters With =_SORT_DEFAULTS DEFINE
Another way to establish FastSort parameters is with the default SORT DEFINE
=_SORT_DEFAULTS. This method is recommended when it would be difficult to
modify existing applications.
When an HP COBOL program calls FastSort, FastSort uses the attributes of
=_SORT_DEFAULTS if all of these conditions are true:
No user DEFINEs have been specified
No FastSort parameters are set
DEFMODE is on
You can create a =_SORT_DEFAULTS DEFINE by using the ALTER DEFINE
statement in your command interpreter. You can use the command
22> INFO DEFINE =_SORT_DEFAULTS, DETAIL
to determine whether the DEFINE exists and what its current settings are.
You cannot use =_SORT_DEFAULTS to alter the FastSort parameters SCRATCH and
MODE, because the compiler sets these itself whenever it executes a COBOL SORT
statement. (It sets SCRATCH to the file that the SD entry specifies. It sets MODE to
AUTOMATIC.)
If you specify any FastSort options with FastSort interface routines, you can only use
=_SORT_DEFAULTS to alter the parameters CPU, NOTCPUS, and SUBSORTS;
however, if you specify CPU-MASK, NO-CPU-MASK, or SUBSORT-COUNT with a
FastSort interface, routine, it overrides the respective parameter that you specified with
=_SORT_DEFAULTS.
For more information on the =_SORT_DEFAULTS DEFINE, see the FastSort Manual.
COBOLLIB Overview
The COBOLLIB file is a COBOL object file that contains utility routines supplied by HP.
These routines support COBOL applications that must obtain file information or use
operations not available through the normal language constructs.
COBOLLIB routines fall into two categories:
Saved Message Utility (SMU) routines for the non-CRE environment
Other routines
Most COBOLLIB routines have a non-CRE version and a CRE version.
The COBOLLIB file is only for the COBOL85 compiler, and primarily for the non-CRE
environment. The CRE and native versions of the COBOLLIB routines are in other
files, as Table 13-7 shows.