The following steps will provide diagnostic information to assist in debugging programs using the UniAccess System.
- Turn UACS traces on high and review the contents of the trace file after executing the failed program. The trace file will contain error, warning, and informational messages to assist in debugging. Refer to Appendix D of the UniAccess for OS 2200 System Administration Guide for a list of all the trace file messages.
- If ODBC calls are being issued, UADriver tracing provides a method for logging the function calls and function results between an ODBC application and the UniAccess ODBC Driver.
- Review the sequence of library calls to ensure that they are in the proper order. Typically, commands that are not in the correct sequence will result in a return code indicating the incorrect state. However, a valid state that is different from the expected state may return unexpected results.
- Review the program to ensure that the return status is checked after every library call. A bad return code from one library call can result in an error on subsequent calls.
- Ensure that parameters are properly aligned. Including the debug version of the appropriate stub will verify correct alignment UACLSTUBDBG/OBJ, UASLSTUBDBG/OBJ, or UASLSTUBDBG/REL).
- Identify the statement causing the error and verify that all of the parameters contain the expected values prior to the call. DISPLAY or PRINTF statements are typically used in debugging. PADS can be used interactively to debug demand programs (UACL) and in postmortem mode (DIAG$ file) to debug any type of program.
Knowledge Base: Debugging UniAccess Programs