How to debug why a server application is failing for any reason.
IDMS - All Supported Releases
Here are two ways to identify where the problem occurs. The first is by testing each of the SQL statements in the code. If this is a program written at your site, you can test the SQL statements in that program under the IDMS CV using the online (OCF) or batch command (IDMSBCF) facility. This may require changing the format of the command slightly, for example, to reference literals instead of any host variables that are specified.
A second alternative is to turn on ODBC traces within the IDMS Database Server Option, as follows:
If you have run the traces, at this point, you may have enough information to understand the error. If the error message does not clarify the nature of the problem, then we recommend you begin testing and debugging it is using OCF or IDMSBCF. If the task fails, you have determined that the statement is flawed and you must correct it. You can get detailed information on the error by running the query in a local mode IDMSBCF job with these SYSIDMS parameters:
ECHO=ON
CATUSER=OFF
DMCL=<your-dmcl>
SQLTRACE=ON
DMLTRACE=ON
PROCTRACE=ON (if using table procedures)
If the statement executes successfully under OCF or IDMSBCF, the problem is in the original statement (before any substitution of literals for variables) or with the software handling the statement. Again, if you have the ODBC trace message, you may have the information you need to debug this. If you do not, then you will need to code a small program with the original statement embedded in it, and execute it. If this program, containing the exact original code, also abends, then you have identified that the original statement is flawed and must be debugged.
If the program runs successfully, then you have shown that the error is one of the several software layers separating the mainframe server from the platform on which your application is running. The only alternative at this point is to use the detailed error messages in the trace to pinpoint where the error occurred. You may need assistance from Technical Support to interpret the trace.