application programming errors, problem determination" /> Preliminary checks

 

Preliminary checks

Before you start problem determination in detail, it is worth considering the facts to see if there is something obvious with which to start your investigation. This approach to debugging can often save a lot of work by highlighting a simple error, or by narrowing down the range of possibilities.

The cause of your problem could be in any of the following:

The sections that follow raise some fundamental questions that we need to consider.

As you go through the questions, make a note of anything that might be relevant to the problem. Even if your observations do not suggest a cause immediately, they could be useful later if you have to carry out a systematic problem determination exercise.

The following steps are intended to help you isolate the problem and are taken from the viewpoint of an WebSphere MQ application. Check all the suggestions at each stage.

  1. Has WebSphere MQ for iSeries run successfully before?

    Yes

    Proceed to Step 2.

    No

    It is likely that you have not installed or set up WebSphere MQ correctly.

  2. Has the WebSphere MQ application run successfully before?

    Yes

    Proceed to Step 3.

    No

    Consider the following:

    1. The application might have failed to compile or link, and fails if you attempt to invoke it. Check the output from the compiler or linker.

      Refer to the appropriate programming language reference manual, or the WebSphere MQ Application Programming Guide, for information on how to build your application.

    2. Consider the logic of the application. For example, do the symptoms of the problem indicate that a function is failing and, therefore, that a piece of code is in error.

      Check the following common programming errors:

      • Assuming that queues can be shared, when they are in fact exclusive.

      • Trying to access queues and data without the correct security authorization.

      • Passing incorrect parameters in an MQI call; if the wrong number of parameters is passed, no attempt can be made to complete the completion code and reason code fields, and the task is ended abnormally.

      • Failing to check return codes from MQI requests.

      • Using incorrect addresses.

      • Passing variables with incorrect lengths specified.

      • Passing parameters in the wrong order.

      • Failing to initialize MsgId and CorrelId correctly.

  3. Has the WebSphere MQ application changed since the last successful run?

    Yes

    It is likely that the error lies in the new or modified part of the application. Check all the changes and see if we can find an obvious reason for the problem.

    1. Have all the functions of the application been fully exercised before?

      Could it be that the problem occurred when part of the application that had never been invoked before was used for the first time? If so, it is likely that the error lies in that part of the application. Try to find out what the application was doing when it failed, and check the source code in that part of the program for errors.

    2. If the program has run successfully before, check the current queue status and files that were being processed when the error occurred. It is possible that they contain some unusual data value that causes a rarely used path in the program to be invoked.

    3. The application received an unexpected MQI return code. For example:

      • Does your application assume that the queues it accesses are shareable? If a queue has been redefined as exclusive, can your application deal with return codes indicating that it can no longer access that queue?

      • Have any queue definition or security profiles been changed? An MQOPEN call could fail because of a security violation; can your application recover from the resulting return code?

      Refer to the information in the WebSphere MQ Application Programming Reference for your programming language for a description of each return code.

    4. If you have applied any PTF to WebSphere MQ for iSeries, check that you received no error messages when you installed the PTF.

    No

    Ensure that you have eliminated all the preceding suggestions and proceed to Step 4.

  4. Has the server system remained unchanged since the last successful run?

    Yes

    Proceed to Problem characteristics.

    No

    Consider all aspects of the system and review the appropriate documentation on how the change might have impacted the WebSphere MQ application. For example :

    • Interfaces with other applications

    • Installation of new operating system or hardware

    • Application of PTFs

    • Changes in operating procedures