WEBCORETechnologies
IBM i & ERP teams · 7 min read

IBM i and AI: Where to Start

Four practical ways to start using AI with IBM i and Db2 for i data, from read-only questions to agents, plus the groundwork that keeps it safe.

By Jose Acosta · October 27, 2026

Most IBM i shops are asked the same question this year: what are we doing about AI? The pressure usually comes with an assumption that the system has to change first. It doesn't. Your IBM i already holds the thing AI needs most, which is decades of clean, structured business data and business rules that work. The job is to connect AI to that safely, one useful step at a time.

Start with a question, not a model

Skip the debate about which AI model to buy. Pick one question people ask every week that takes too long to answer, or one task someone does by hand that follows the same steps every time. That becomes the first project, and it tells you what data the AI needs, who uses it and how you will know it worked.

Four starting points, easiest first

1. Let people ask questions of their data

“Which open orders for this customer are past their promise date?” is a quick question for someone who knows the files and a ticket for everyone else. An assistant that reads a few curated, read-only views can answer it in plain English, show the numbers it used and stay inside what you allowed. This is the lowest-risk start because nothing on the system changes and the AI can only read.

2. Help your team understand the code

Knowledge of what each program does, and which files and fields it touches, often lives with a few long-time developers. AI is good at reading RPG, CL and DDS and explaining them, and it gets much better when it can also search your cross-reference data. On one project we turned a 1.39M-row IBM i cross-reference database into 12,332 linked documents that AI agents can search, so questions like “what updates this field?” get answered in seconds.

3. Automate the paperwork around the ERP

Invoices, purchase orders and customer emails arrive as PDFs and messages, then someone types them into the ERP. AI can read them, check them against IBM i data and prepare the entry for a person to approve. The pattern is the same as in 5 jobs a small team can hand to AI, with the ERP as the system of record.

4. Let agents take actions, carefully

Once AI can read reliably, the next step is letting it do things: check stock, place a hold, create a quote. It should only act through the same APIs and stored procedures your other systems use, never by writing to files directly, and with a person approving anything that matters. If your programs aren't callable yet, start with how to call an RPG program from a REST API.

The groundwork that makes all four work

Know what your data means

AI can't guess that ORDSTS = 'H' means “on credit hold.” The column text already in your files is a good start, and Db2 for i will hand it to you as a table:

-- What do the files and fields in a library actually hold?
-- Column text from DDS or SQL becomes a data dictionary an assistant can read.
SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE, LENGTH, COLUMN_TEXT
  FROM QSYS2.SYSCOLUMNS
 WHERE TABLE_SCHEMA = 'ORDLIB'
 ORDER BY TABLE_NAME, ORDINAL_POSITION;

Program-to-file relationships come from a command you already have:

/* Which files does each program use? Write the cross-reference to a table. */
DSPPGMREF PGM(ORDLIB/*ALL) OUTPUT(*OUTFILE) OUTFILE(QTEMP/PGMREFS)

Add a short list of status codes and business terms in plain English, and the assistant can explain results the way your team would.

Give AI its own narrow door into the data

Build a small set of read-only SQL views with clear names, only the columns the use case needs, and a dedicated user profile that can read those views and nothing else. Names below are examples; yours will match your files.

-- A curated, read-only view for the assistant: clear names, only the
-- columns it needs, nothing sensitive. The AI never sees ORDLIB directly.
CREATE OR REPLACE VIEW AIREAD.OPEN_ORDERS (
  ORDER_NO, CUSTOMER_NO, CUSTOMER_NAME, ORDER_DATE, PROMISE_DATE, STATUS, ORDER_TOTAL
) AS
SELECT H.ORDNO, H.CUSNO, C.CUSNAM, H.ORDDTE, H.PRMDTE, H.ORDSTS, H.ORDTOT
  FROM ORDLIB.ORDHDR H
  JOIN ORDLIB.CUSMST C ON C.CUSNO = H.CUSNO
 WHERE H.ORDSTS <> 'C';

-- A dedicated profile that can read the AIREAD views and nothing else.
GRANT SELECT ON AIREAD.OPEN_ORDERS TO AISVC;

Decide where the AI runs

Business AI services can be configured not to keep or train on your data, which suits most companies. If your data can't leave the building, models can run on your own servers instead. Either way, the AI connects to IBM i through the views and APIs above, not with a powerful user profile.

A sensible first project

  1. Pick one question or task, and the two or three people who will use the result.
  2. Build the read-only views and the data dictionary for just that use case.
  3. Connect an assistant, test it against answers your team already knows, and fix what it gets wrong.
  4. Put it in front of those users, measure the time saved, then choose the next use case.

None of this replaces your IBM i or your RPG. It puts what's already there to work in a new way. If you want help choosing the first use case, that is exactly what our IBM i & ERP and AI automation work starts with.

Related service
Core system modernization

IBM i, Infor and other proven systems, extended without a rewrite.

Learn more →

Let's get more out of the system you trust.

Book a free call →