Application problems
The best time to handle a problem with an application is before it goes into production. However, it is impossible to anticipate all the conditions that will exist for an application when it gets into general use.
The job log of either the application requester (AR) or the application server (AS) can tell you that a package failed; the listings of the program or the package can tell you why it failed. The SQL compilers provide diagnostic tests that show the SQLCODEs and SQLSTATEs generated by the precompile process on the diagnostic listing.
For Integrated Language Environment® (ILE) precompiles, you can optionally specify OPTION(*XREF) and OUTPUT(*PRINT) to print a precompile source and cross-reference listing. For non-ILE precompiles, you can optionally specify *SOURCE and *XREF on the OPTIONS parameter of the Create SQL program (CRTSQLxxx) commands to print a precompile source and cross-reference listings.
- Listings
The listing from the Create SQL program (CRTSQLxxx) command provides these kinds of information.
- SQLCODEs and SQLSTATEs
Program interfaces using SQL return error information to the application program when an error occurs. SQLSTATEs and their corresponding SQLCODEs are returned to the application program in either the SQL communication area (SQLCA) or the SQL diagnostic area.
Parent topic:
Troubleshooting