Data Build Manual

Customizing SQL-LOAD Output
Customizing Data Build
099331 Tandem Computers Incorporated 6–25
Sorting Data Before Using
SQL-LOAD
SQL-LOAD performance can be improved if the input is sorted in primary key
sequence, in which case specify SORTED for Option 2 on the CONFIGURE (F1,
Conversion Environment) screen. This directs Data Build to include the SORTED
option when it prepares the SQLCI LOAD command in file ZZLOAD, thus bypassing
a sort by SQLCI.
SQL-LOAD Sorted EBCDIC
Input
It may be difficult to get sorted input data if one of the primary key columns is
character type and the data comes from an IBM system. IBM alphanumeric data is in
EBCDIC, which has a different collating sequence than ASCII, which is used on
Tandem. In ASCII collating sequence, numbers come first, uppercase next, and
lowercase last. In EBCDIC collating sequence, the order is reversed. Display data
from IBM sorted in EBCDIC collating sequence must be resorted on Tandem.
Binary (computational) columns are the same in EBCDIC and ASCII. If the primary
key contains only computational columns, the SQL-LOAD performance will be greatly
enhanced if the data is extracted from IBM in primary key sequence.
IBM data can be sorted on an IBM system using the IBM DFSORT product. It can sort
EBCDIC data in ASCII collating sequence. For example, the SORT control statement
allows the following:
SORT FIELDS=(
p
,
m
,
f
,
s
...)
or
SORT FIELDS=(
p
,
m
,
s
.....),FORMAT=f
where the p, m, f, s or p, m, s sequence is repeated for each sort control field.
p
specifies the position of the first byte of the control field relative to the beginning
of the input record (first byte = 1).
m
specifies the length of the control field.
f
specifies the format of the data in the control field. There are many formats to
choose from. The AC format is special in that it does not specify the format of the
data, but rather “sequences EBCDIC data using the ISCII/ASCII collating
sequence.” AC allows EBCDIC data to be properly sequenced for efficient loading
on Tandem.
s
specifies how the control field is to be ordered. The valid codes are the following:
A
specifies ascending order.