File Utility Program (FUP) Management Programming Manual

FUP Programmatic Interface
File Utility Program (FUP) Management Programming Manual523322-001
2-18
Handling FUP Errors
Types of FUP Errors
When your application sends a command buffer to FUP, these types of errors can be
returned:
Syntax errors in the FUP command format
Command failure errors encountered by FUP
Command failure errors encountered by a subsystem or software component other
than FUP
Syntax Errors in the Command Format
FUP evaluates the command format in the buffer to determine if any syntax errors
exist. Examples of these errors are an invalid token value or an invalid command. A
FUP error list for a syntax error contains the ZSPI-TKN-ERROR token, which identifies
the error and the FUP SSID, and the ZSPI-TKN-PARM-ERR token, which contains
information about the syntax error. Because the command failed before FUP
processed the file, a file name is not included in the error list.
An example of an invalid token value error occurs if a field within a structured token is
out of range. ZSPI-TKN-RETCODE has a value of ZFUP-ERR-INV-VALUE (7) to
indicate this error. See Figure 2-8.
Figure 2-8. Error List for a Syntax Error
FUP Errors
These errors are found when FUP attempts to execute the command. Examples of
these errors are an empty source file or a command that is not allowed for the file type.
The error list contains the token ZSPI-TKN-ERROR and a token map ZFUP-MAP-
CMD-ERROR, which identifies the command that failed, the object type, and the file
that FUP was processing when the error occurred.
An example of this occurs if the empty source file error reports that a source file is
empty (contains no records) for an attempted LOAD command, with the ZEMPTYOK
option not specified. ZSPI-TKN-RETCODE has a value of ZFUP-ERR-EMPTY-
SOURCE (35) to indicate this error. For a sample of this type of error list, see
Figure 2-9 on page 2-19.
ZSPI-TKN-ERRLIST
ZSPI-TKN-ERROR
Z-SSID ! FUP subsystem ID
Z-ERROR ! ZFUP-ERR-INV-VALUE (7)
ZSPI-TKN-PARM-ERR
Z-TOKENCODE ! Token code that caused the error
Z-INDEX ! Occurrence number of the token
Z-OFFSET ! Byte offset of the field that
! caused the error
ZSPI-TKN-ENDLIST