In order for the database manager to properly handle the return codes from the user exit program, the program must be coded to provide specific return codes to show specific results.
Table 120 shows the return codes that can be returned by a user exit program.
and how the database manager interprets that return code. If a return
code is not listed in the table, it is treated as if its value were 32.
Table 120. User Exit Return Codes and Results
|Return Code||Result (Note 1)||Explanation|
|4||Note 2||Temporary resource error encountered.|
|8||Note 2||Operator intervention is required.|
|12||Note 3||Hardware error.|
|16||Note 3||Error with the user exit program or a software function used by the program.|
|20||Note 3||Error with one or more of the parameters passed to the user exit program. Verify that the user exit program is correctly processing the parameters provided.|
|24||Note 3||The user exit program was not found. For OS/2 this error message also means that a file needed to complete a RESTORE DATABASE operation could not be found in the current backup media.|
|28||Note 3||Error caused by an I/O failure or the operating system.|
|32 (and all other values)||Note 3||The user exit program was terminated by the user.|
If the user exit program was called to archive log files, your disk can be filled with log files and performance may be degraded because of extra work to format these log files. Once the disk becomes full, database manager will not accept further application requests for database changes.
If the user exit program was called to retrieve log files, roll-forward recovery is suspended but not stopped unless a stop was specified in the ROLLFORWARD DATABASE utility. If a stop was not specified, you can correct the problem and resume recovery.
Because the user exit program is called by the underlying operating system command processor, there is a possibility that non-zero return codes are returned from the operating system. These error codes are not remapped. Consult the operating system message help information for a description of those error codes.
Error Handling for OS/2:
For the BACKUP DATABASE and RESTORE DATABASE utilities, any non-zero return code returned by a user exit program causes the utility to fail and no retry is attempted. The utilities report a general SQLCODE -2029. The message text for this SQLCODE displays the return code returned from the user exit program or from the operating system.
[ DB2 List of Books | Search the DB2 Books ]