File Utility Program (FUP) Management Programming Manual

FUP Commands and Responses
File Utility Program (FUP) Management Programming Manual523322-001
3-36
LOADALTFILE Command
ZSPI-TKN-ERRLIST
is the standard SPI token that begins an error list. The error list ends with
ZSPI-TKN-ENDLIST.
Considerations
FUP returns one structure for each partition loaded, but it returns only one
ZFUP-MAP-LOADALT-XFER-CNTS structure if the loaded file is not partitioned.
To perform a LOADALTFILE operation, you must have both read and write access
to both the primary and alternate-key files.
LOADALTFILE ignores any NO UPDATE specifications, and it honors a NULL
specification that is defined for a key field. (FUP does not generate an alternate-
key record for a field that has only null characters if the null character is defined.)
A sort operation occurs as you execute LOADALTFILE. The primary file is read
sequentially with its primary-key field. For each record read from the primary file,
the alternate-key records are generated and written to the FASTSORT process.
When the sort completes, the sorted records are read from the FASTSORT
process and loaded into the indicated alternate-key file. During the sorting phase,
disk space for the sort scratch file and the alternate-key file must exist concurrently.
A LOADALTFILE operation fails a duplicate key in an alternate-key file has the
UNIQUE attribute. If the attributes of the alternate-key file are incorrect,
LOADALTFILE fails and FUP returns the ZFUP-ERR-FILE-KEY-INCOM error list.
LOADALTFILE does not generate alternate-key file records or return an
explanatory error list in these cases:
°
The full length of the alternate-key field is not contained in the primary record.
°
A null value was specified for the key, and the field contains only the null value.
Table 3-4. Errors Returned by LOADALTFILE
Error Number
Symbolic Name
(ZFUP-ERR-) Description
21 BAD-KEY FUP detected invalid alternate-key parameters.
37 FILE-KEY-INCOM An alternate-key file is invalid with the specified
alternate keys.
47 NO-ALT-FILE An alternate-key file does not exist.
59 SHORT-KEYS FUP detected incomplete alternate-key fields.
Note. For more information about all FUP error numbers and their corresponding error
lists, see Appendix B, FUP Error Messages