Skip to content

Migrating from AS/400: when it makes sense and how to quantify the risk

B2Bnetwork team · · 6 min

IBM i, RPG and mainframe

In brief

Migrating from AS/400 makes sense when the system no longer fits the company's processes or nobody is left to maintain it, and a new system covers those processes at a lower cost over 5–7 years. It does not make sense when the only reason is "old technology". You can quantify the migration risk: measure the system with IBM i commands (programs, files, dependencies, interfaces), score the probability and impact of each risk in money, and add the cost of running both systems in parallel.

Five situations where migration makes sense

A migration decision needs a concrete trigger. The most common ones are:

  1. The company is moving to a standard ERP package that covers most of the processes now written in RPG, and the gaps can be closed with configuration.
  2. Nobody is left to maintain the system. The last people who know it are leaving, and no successors were found within a year.
  3. The system holds the business back. New sales channels, integrations or reports wait for months, and an API layer over the old logic is not enough.
  4. A merger or acquisition. The group has one target system, and keeping a second one is not worth it.
  5. The cost case is clear. The full running cost, calculated as in AS/400 maintenance cost, exceeds the cost of migration plus the new system over several years.

When does migration not make sense? When the system works, the people are there, and the only problem is how the screens look or a missing API. Then modernizing in place is cheaper, as described in IBM i modernization: refactoring, APIs or migration.

Measure the system before you assess the risk

Migration risk grows with the size and entanglement of the system. You can collect these numbers from IBM i itself in a few days:

MeasureHow to collect itWhat it says about risk
Number of RPG, CL and COBOL programsDSPOBJD with output to a filehow much logic has to be moved or replaced
Programs actually in uselast-used date in DSPOBJDhow much code you can leave out
Program-to-file dependenciesDSPPGMREF with output to a filewhich programs have to move together
Files and their logical filesDSPDBRhow entangled the data model is
Interfacesjob scheduler entries, exchange files, ODBC and FTP connectionshow many systems need to be reconnected
Data volume and historyfile sizes, years of data in the databasedata migration time and cutover window

The last column matters more than the numbers. It often turns out that only half of several thousand programs are in use, and a dozen or so files are read by hundreds of programs. Those files set the order of the migration and mark its hardest parts.

A weighted risk register

Risk is probability times impact, expressed in money or days of delay. Below are typical risks of migrating from AS/400 with an example scale (probability 1 to 5, impact 1 to 5):

RiskProbabilityImpactHow to reduce it
Business rules that exist only in RPG code45document processes and build comparison tests before migrating
Bad historical data that DDS never validated43a trial data migration with an error report
Unknown interfaces (files, FTP, night jobs)34inventory of the scheduler and connections
Performance of the new system in the night run34a performance test at full volume
People who know the old system leaving mid-project35contracts for the project duration, knowledge transfer
Resistance from users used to 5250 screens32prepare key users, a transition period

The product shows where to spend the first money. Risks scoring 15 or more are worth reducing before the migration decision, not during the project. Add a contingency to the budget for risks you cannot reduce; it is usually derived from the expected value of the top items.

Four migration paths and their risks

PathWhat it meansMain risk
Standard ERP packageprocesses move to an off-the-shelf systemprocess fit, loss of company-specific rules
Rewritea new application built from process descriptionstime, cost, and rules nobody wrote down
Automated code conversiona tool translates RPG into another languagehard-to-maintain code, errors in edge cases
Gradual retirementnew modules take over functions one by one, the old system shrinksa longer period with two systems and data synchronization

Gradual retirement, described as a pattern in The strangler fig pattern, spreads the risk over time and lets you stop after any stage without losing everything.

Parallel running and data reconciliation

The most expensive migration error is a result that differs from the old system without anyone noticing. That is why the plan includes a period of parallel running: both systems process the same transactions, and reconciliation reports show the differences.

  1. Choose the measures to reconcile: account balances, stock levels, document counts, invoice totals per period.
  2. Prepare SQL queries on both sides that calculate these measures in the same way.
  3. Classify every difference: a defect in the new system, bad historical data, or an intended change.
  4. Cut over only when unintended differences drop to zero for an agreed number of cycles, for example two month-end closes.

The cost of parallel running (double work for users, licenses for both systems, people to analyze differences) has to be in the budget from the start. The approach to comparing data after migration is shown in the case study on data migration testing in a merger of two banks, and the technique is described in Data migration testing.

Measuring the system, the risk register and comparing the paths are the scope of Analysis and architecture. B2Bnetwork engineers work on IBM i systems at banks, insurers and manufacturers, so they start from the numbers in your system rather than a ready-made answer.

Questions and answers

How long does a migration from AS/400 take?

It depends on the number of programs in use, the interfaces and the migration path. Implementing a standard ERP in a mid-sized company usually takes a year or more, a rewrite takes longer, and gradual retirement spreads the work over several years. Measuring the system in the first weeks gives the first realistic estimate.

Can we move data off AS/400 without stopping the business?

Yes, with a plan. Historical data is moved in advance, and only the changes from the last few days are moved in the cutover window. The database journal on IBM i lets you capture changes since the last copy. The cutover is usually planned for a weekend or another low-traffic period, with a fallback plan.

Is automatic conversion of RPG to Java or C# a good idea?

It can be fast, but it carries the structure of the old code into the new language. The result works, but the team maintains code that no Java or RPG developer ever wrote. It makes sense when the goal is to leave the platform quickly, not to improve the system. It requires full comparison testing.

How do we convince the board that the risk has been quantified?

Show the weighted risk register, the contingency derived from the top items and the parallel running plan with reconciliation measures. A board accepts a number with stated assumptions more readily than an assurance that "it will be fine". Add conditions for stopping the project after each stage.

What it looks like in a project

Developing a system on IBM i or mainframe? Talk to an RPG engineer.

Let's talk

Read more: IBM i, RPG and mainframe

All in IBM i, RPG and mainframe →