Why message control matters
IBM i applications communicate through messages as much as they communicate through database writes. Message queues and job logs make that communication visible when the system needs to explain what happened.
A clean diagnostic trail turns a vague failure into a specific next step. Without that trail, operators and developers are forced to guess.

At a glance
The team should be able to classify each error by who needs to act, what should be logged, and whether the job can continue.
| Concept | What it means | What to watch |
|---|---|---|
| Escape message | A failure that should move up the stack | Do not swallow it before the caller sees it. |
| Inquiry message | A message that expects a reply | Define who is responsible for answering it. |
| Job log | The execution history of the job | Review it before restarting the work. |
| Control flow | How the program reacts to a failure | Choose stop, retry, or continue intentionally. |
Why this matters for daily work
Support teams move faster when the program gives them context: what failed, where it failed, and whether the problem is business data, authority, or system state. Without that context, every incident becomes a manual investigation.
Core concepts
| Concept | Practical meaning | Review point |
|---|---|---|
| Message queue | This is where a program, user, or operator can see the message that explains the event. | Keep it readable and actionable. |
| Escape handling | Escalating a meaningful escape message is better than pretending the failure did not happen. | Decide which layers must see it. |
| Central logging | Job logs and application logs should work together instead of competing for attention. | Correlate the records. |
| Operator handoff | If human action is required, the message should make that obvious and actionable. | Include the next step. |

Practical example
If a batch job cannot open a file, the message queue can tell the operator which file failed and the job log can show the earlier steps that led there. That usually shortens the time to fix the issue more than any amount of guesswork could.
Implementation checklist
- Classify the error before choosing how to handle it.
- Send a meaningful message instead of a generic failure code.
- Preserve the job log and the message queue contents for review.
- Decide whether the job should stop, retry, or continue.
- Document the operator response when a human needs to take over.
The best error handling is the one that tells support what to do next without hiding the root cause.
Common mistakes
- Swallowing errors instead of sending a clear diagnostic message.
- Letting job logs grow without a review process.
- Ignoring inquiry messages until the queue is backed up.
- Writing application code that gives support teams no clue where to look next.