FastSort Manual

Optimizing Sort Performance
FastSort Manual429834-003
9-16
Automating DEFINEs
Automating DEFINEs
The following examples show how you can use command files to set up FastSort
DEFINEs.
Using a Command File to Set DEFINEs from TACL
The following is an example of a TACL command file that sets SORT DEFINEs for an
interactive sort operation:
DELETE DEFINE =SORT_ONE
SET DEFMODE ON
SET DEFINE CLASS SORT
SET DEFINE SCRATCH $data.fastsort.scratch
SET DEFINE BLOCK 28762
SET DEFINE SCRATCHON ($data??)
SET DEFINE SEGMENT 256
SET DEFINE SWAP $data.fastsort.swapfile
SET DEFINE PRI 80
ADD DEFINE =SORT_ONE
Note that the first line of the command file deletes the =SORT_ONE DEFINE, if it
already exists. This step is optional and ensures that only the values you specify for
=SORT_ONE in the command file affect this sort operation. The SET DEFMODE ON
command enables DEFINEs for the current TACL session.
To execute this command file, type OBEY filename at a TACL prompt.
Using a Command File to Set DEFINEs from SQLCI
You can use the OBEY command to execute a command file for SQL/MP sorts from
your SQLCI prompt. The following is an example of a command file that sets up a
=_SORT_DEFAULTS DEFINE from within SQLCI:
DELETE DEFINE =_SORT_DEFAULTS;
SET DEFMODE ON;
SET DEFINE CLASS SORT;
OBEY SCRATCH1;
SET DEFINE BLOCK 57524;
SET DEFINE CPU 8;
SET DEFINE MODE MINTIME;
SET DEFINE SCRATCHON ($data2, $data4);
SET DEFINE SWAP $spare;
ADD DEFINE =_SORT_DEFAULTS;
Nesting Command Files in SQLCI
A command file that you execute from within SQLCI can execute another command
file. You can nest up to four command files in this manner to simplify configuration
changes. For example, the command file SCRATCH1 named in the previous file