Locating the problem in an application

If your program does not run correctly, you need to isolate the problem. You should check several items.

About this task

Those items are:
  • Output from the precompiler, which consists of errors and warnings. Ensure that you have resolved all errors and warnings.
  • Output from the compiler or assembler. Ensure that you have resolved all error messages.
  • Output from the linkage editor.
    • Have you resolved all external references?
    • Have you included all necessary modules in the correct order?
    • Did you include the correct language interface module? The correct language interface module is:
      • DSNELI or DSNULI for TSO
      • DFSLI000 for IMS
      • DSNCLI or DSNULI for CICS®
      • DSNALI or DSNULI for the call attachment facility
      • DSNRLI or DSNULI for the Resource Recovery Services attachment facility
    • Did you specify the correct entry point to your program?
  • Output from the bind process.
    • Have you resolved all error messages?
    • Did you specify a plan name? If not, the bind process assumes that you want to process the DBRM for diagnostic purposes, but that you do not want to produce an application plan.
    • Have you specified all the packages that are associated with the programs that make up the application and their partitioned data set (PDS) names in a single application plan?
  • Your JCL.
    IMS
    • If you are using IMS, have you included the DL/I option statement in the correct format?
    • Have you included the region size parameter in the EXEC statement? Does it specify a region size that is large enough for the required storage for the Db2 interface, the TSO, IMS, or CICS system, and your program?
    • Have you included the names of all data sets (Db2 and non-Db2) that the program requires?
  • Your program.

    You can also use dumps to help localize problems in your program. For example, one of the more common error situations occurs when your program is running and you receive a message that it abended. In this situation, your test procedure might be to capture a TSO dump. To do so, you must allocate a SYSUDUMP or SYSABEND dump data set before calling Db2. When you press the ENTER key (after the error message and READY message), the system requests a dump. You then need to use the FREE command to deallocate the dump data set.