AS400 Modernization Without Throwing Away What Works

AS400 Event Integration That Keeps Customers in the Loop

Send IBM i order updates to your portal without holding up dispatch. See how to recover failed messages without creating duplicate shipments.

The order shipped. Your customer portal still says processing. Now someone has to take the call, check IBM i and explain the delay.

AS400 event integration closes that gap. Your application saves the shipment, then sends the update to the systems that need it. Order entry keeps moving even when the portal is down.

The catch is recovery. A dropped connection must not lose an order update or send the same shipment twice. Build that into the first connection.

AS400 Events Tell the Portal What Just Happened

An API answers, "Where is order 48152 right now?" An event says, "Order 48152 just shipped." Your website can use the API to show the latest status while the event sends the shipping update to the customer.

Keep order changes under the IBM i application's rules. If another system needs to change an order, give it an authorized API. Direct writes to the order tables can skip the checks that keep your business out of trouble.

How an IBM i Shipment Reaches Your Customer Portal

The shipment and its event must save together or roll back together. This example uses one Db2 for i transaction for both. Have your IBM i developer check journaling and commitment control in every program that changes the order before building it.

  1. Save the shipment and event together. When the RPG program marks the order shipped, insert an event into a durable outbox table in the same transaction. An outbox is the list of changes waiting to be sent. A rollback must remove both changes.
  2. Read committed events. A separate relay claims unsent rows with locking or leases so concurrent workers cannot silently lose work. It publishes only committed changes.
  3. Send a stable event identity. Include an event ID, order ID, order version, event type, occurrence time and schema version. Send only the fields each recipient needs.
  4. Apply the update safely. The receiver saves the event ID with its update in one transaction. Seeing that ID again creates no second shipment notice or invoice. Compare order versions so an old event cannot overwrite newer state.
  5. Record delivery and reconcile. Record broker acceptance after the broker accepts the event. Track receiver completion separately when needed, then compare the portal state with IBM i on a schedule.

A broker accepting a message is not proof that the portal applied it. Keep those milestones separate.

Define the Order Update Before You Buy Integration Software

Agree on what "shipped" means before anyone connects a queue. A changed database row could mean a shipment, a correction or a cancellation. The receiving system needs the business meaning. Write down the fields it receives and how it handles each change.

Contract itemExampleWhy it matters
Identity and orderingEvent evt-48152-8; order 48152; version 8Recognize a replay and reject older order state.
Meaning and dataOrderShipped; schema version 1; time in UTCAgree on the business change and its fields.
Delivery and recoveryRetained event; retry schedule; failed-message queueRecover without asking a dispatcher to re-enter work.
OwnershipNamed application, integration and receiver contactsSend an alert to someone who can fix it.

Keep Each Order Update in the Right Sequence

Generate the event ID once and retain it through every retry. Use an order-specific version with a defined gap policy. If version 8 arrives before version 7, decide whether the receiver can fetch current state or must wait for the missing transition. A payment or stock movement needs stricter treatment than a display-only status.

Send the Fields the Receiver Actually Needs

Publish a sample payload and describe required fields. Add compatible optional fields before retiring an old version. Limit personal and commercial data to what the receiver needs. Authenticate connections, encrypt transport and restrict who can publish, read or replay events.

A Retry Must Never Create a Second Shipment

Test What Happens When Delivery Fails

The relay can stop after publishing but before marking the outbox row sent. On restart it may publish the same event again. Design for that duplicate and test the business effect at the receiver.

Failure to testExpected resultOwner
Order transaction rolls backNo committed shipment event remains to publish.IBM i application team
Acknowledgement is lostA retry uses the same ID and creates no duplicate action.Relay and receiving teams
Receiver is unavailableEvents stay recoverable; the oldest pending event triggers an alert.Integration team
A payload cannot be processedQuarantine it with an error reason and controlled replay.Receiving application team

Use bounded retries with increasing delays. A permanently invalid message belongs in a failed-message queue for review, not an endless loop that blocks every later order. Retain enough history to reconcile and replay within the agreed recovery window.

IBM i Data Queues, Outbox Tables or Change Capture?

IBM i data queues can pass work between programs asynchronously. They may fit an existing application well. A data queue alone does not establish the end-to-end transaction, retention, replay and duplicate-handling rules above. Test the exact queue and receiver design before treating it as durable delivery.

A transactional outbox gives the application an explicit business-event record. Journal-based change capture can reduce application changes, but needs a reliable way to interpret committed row changes as business events. Make the supplier demonstrate its approach against the actual application and recovery requirements.

Keep the current-state lookup in the AS400 API integration plan. Events and APIs work together: one reports a change, the other lets a receiver confirm what is true now.

Prove One Shipment Works Before Connecting the Whole Business

Start with one order-status event and one receiving system. The application owner approves its meaning. The integration owner monitors the relay and backlog. The receiving-system owner handles failed payloads and replays. Each needs a named backup and an escalation contact.

Agree on an acceptable update delay and recovery window. Measure the oldest pending event, retries, quarantined messages and order-state mismatches. Run the rollback, duplicate, outage and version-change tests. Expand after the team can recover without creating a second shipment, invoice or stock movement.

Ready to connect your IBM i applications? Start with IBM technology providers and ask for a demonstration of your shipment flow, including a failed delivery and a safe retry. A slide deck cannot prove that.

IBM Documentation Behind This Integration Example

Sources checked November 15, 2026. This is a design example. Your developer must confirm that the application supports the transaction and recovery behavior described here.

Frequently Asked Questions

Do IBM i events replace APIs?
No. An event reports a change; an API can retrieve the current state or accept an authorized command. The same integration often needs both.
Can an IBM i data queue guarantee that an outside system applied an event?
No. The queue is one part of the exchange. The application still needs defined persistence, acknowledgement, replay and duplicate handling through to the receiving system.
What should an AS400 event-integration pilot test?
Test a rolled-back order, a lost acknowledgement, a receiver outage, an invalid payload and an out-of-order update. Confirm that recovery does not duplicate the business action.