
FUP Commands
File Utility Program (FUP) Reference Manual—523323-014
2-140
LOADALTFILE Example
LOADALTFILE honors any NULL specification defined for a key field, but an
alternate-key record is not generated for a field consisting entirely of null
characters (if such a null character was defined).
A sort operation is performed when you execute LOADALTFILE. The primary file is
read sequentially according to its primary-key field. The alternate-key records are
generated and written to the SORT process for each record read from the primary
file. The sorted records are read from the SORT process and loaded into the
indicated alternate-key file after the sort is complete. Disk space for the sort
scratch file must exist during the sorting phase.
You can use a SORT DEFINE with the LOADALTFILE command. You must define
it before you start FUP. For more information, see the
FastSort Manual
.
If the attributes of the alternate-key file are incorrect (for example, insufficient
record length, key offset not zero, or not a key-sequenced file), LOADALTFILE fails
and displays:
ERROR - ALT FILE IS INCOMPATIBLE WITH ALT KEYS
A duplicate key in an alternate-key file with the UNIQUE attribute causes
LOADALTFILE to fail and display file-system error 71 (duplicate record).
LOADALTFILE does not always generate alternate-key file records or display
explanatory messages if either of these statements apply:
The full length of the alternate-key field is not contained in a specific primary
record.
A null value was specified for the key, and the field contains only the null value.
LOADALTFILE cannot work with SQL files. You must use SQLCI LOAD.
LOADALTFILE Example
This command generates alternate-key records from the primary file (KSFILE) and
loads the records into the alternate-key file with key-file-number 0. A minimum of 10
percent slack space remains in the data blocks of the alternate-key file:
-LOADALTFILE 0, KSFILE, DSLACK 10
Commands Related to LOADALTFILE
OBEY
Reads commands from the specified file and executes them.
COMMAND
Function
Page
LOAD
Creates a structured file from scratch
2-131
BUILDKEYRECORDS
Creates alternate-key file records
2-21