Article

Reply Trace Is Like Analyze Amped Up

IBM i
Posted:
August 24, 2016

As a seasoned QMessage Monitor user, you know it is best practice to use the Analyze function after changing or adding autoreplies. Available in the PC module Maintenance by right-clicking an autoreply, the Analyze function checks which autoreplies share the same message ID with the currently selected autoreply. When matches are found, a list is generated that is split into two categories, “Affected” and “Affects”, as shown in the diagram below. The first figure shows the Analyze tool being used to check whether an autoreply interferes with other autoreplies.

Already a familiar and much-utilized feature for existing QMM users, Analyze is now keeping company with a new functionality called Reply Trace. Introduced in the current version of QMM (i.e., v8), Reply Trace offers users extended capabilities for the management of autoreplies.

When a message is picked up by QMM from one of the monitored message queues, QMM tries to match it against each of the configured autoreplies, comparing the message’s properties (e.g., ID, severity, job name, field values, etc.) against the criteria specified on the autoreply. It repeats this process until it finds the first autoreply that matches the message. Then it performs the action specified on the autoreply (e.g., Log Option and escalation). At this point, the matching typically stops, unless the autoreply is set to “Continue from…”.

So where does Reply Trace come in? Reply Trace allows you to record and view all those steps. In essence, if you turn on Reply Trace, you get a list of the autoreplies QMM went through before hitting on the right one for each message. For those autoreplies that were tested but found not to be a match, QMM records the reason why. For example, the message was CPF1234, but the autoreply specified CPF5678, giving administrators visibility into the reasoning. Reply Trace also shows you which actions the autoreply performed that were eventually matched.

It helps to think of each autoreply as a simple if-then statement in a program: all autoreplies taken together constitute one large program made up of lots of if-then statements. And what do you need to properly maintain a program? Debugging. So that is what Reply Trace really is—it allows you to view each step in autoreply processing and to debug your autoreplies.

How and when should you use Reply Trace? The main reason to use Reply Trace is if your autoreplies are not working as expected. If that is the case, this should help!

Step 1: Configuration

On your host system, go to QMM and choose Option 1 to enter the QMM maintenance. Press F8 to enter the defaults. Under Message Reply Trace, set “Maximum File Size” to 64 (megabytes). Push Enter to return to the list of systems. Select Option 1 for the system where you want to enable Reply Trace. Then, set every field in the Message Reply Trace section to “Y”, as shown below. As usual, the value in cyan, with the dotted underline, stands for the default value, which you can override.

Hit Enter, then F10 to display the status screen. End monitoring for the queue on which the message will be received. Hit F5 until you see the queue as “Not active”. Then start monitoring for the queue again.

Step 2: Send a Test Message

Test your autoreplies by sending a test message (using MMSNDMSG, for example) or wait for your test message to occur “naturally” via an application.

Step 3: Look Under the Cover of QMM Message Processing

Use the MMLOGINQ command on your host to enter the Message Log Inquiry and search for the test message. Specify the message ID, system, current date, and anything else that will help you identify the message in the Activity Log, and press Enter. On the results list, locate the test message. Then select option “H” for “History”. As a result, you will see the Reply Trace. The third figure shows the Message Log Inquiry displaying the Reply Trace.

In this example, you see “Message ID not equal” repeatedly, which represents autoreplies that were not matched. Toward the end, you finally see “Select”, which is a successful match. You can even look at the details of each step with Option 5 or edit the autoreplies from this screen with Option 2.

You don’t have to worry about Reply Trace filling up your disk. The amount of data it stores is limited to the maximum file size you specified in Step 1. When the limit is reached, the oldest entries in the trace are thrown away. If you have a fast system and low CPU and disk utilization, you can simply leave the Reply Trace running in the background. Otherwise we recommend that you turn it off again after your debugging session. Just set the values that you set to “Y” in the first step to the defaults by blanking out the “Ys”.

The Reply Trace feature is just what a power user needs. The decision to enhance QMessage Monitor with the Reply Trace feature came directly from the demands of a real-world IBM i environment. One of our customers, a large bank with a massive base of autoreplies, suggested the new functionality as a solution to their ongoing challenges. Now, we all have the benefit of this powerful new functionality.

Speaking from experience, it has already saved our senior technical solutions consultant, Kurt Thomas, when he was preparing for a demo. His autoreplies just did not do what he wanted them to. As a last resort, Kurt decided to give Reply Trace a spin. Sure enough, where he thought he’d specified the right Message Text on an autoreply, he had indeed configured it incorrectly. It was plain to see in the Reply Trace—and it saved the day.

Want to learn more? Contact us.

Related Products

Related Solutions