# How to Add a Private AI Layer to JD Edwards World on IBM i

> Source: https://netray.co/erp-help/private-ai-layer-jd-edwards-world-ibm-i-on-prem-architecture
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

World runs on DB2 for i with RPG programs and no REST layer, so the AI layer reads DB2 over JDBC or ODBC using a read-only IBM i profile, replicates changes from journals to an off-box copy for heavy questions, rebuilds World's menu and file-level security in the tool server, and writes back only through the documented batch input files and programs after human approval.

## Kind

advanced

## System

jd-edwards

## Erp

JD Edwards World on IBM i

## Module

Private AI layer / DB2 for i

## Query

how to add AI to JD Edwards World on IBM i

## Alternate Queries

- JD Edwards World AI integration
- AS/400 JDE World LLM chatbot on-prem
- query JD Edwards World data from Python JDBC DB2 for i

## Applies To

JD Edwards World A7.3 and A8.1 style releases on IBM i (AS/400, iSeries) V7R3 and later, with data libraries in DB2 for i

## Steps

### Build order for a World private AI layer

**Items:**

Inventory the libraries: the data libraries that hold F-files (for example a production data library and a control library), the program library, and any custom libraries. Record which files are journaled.

Create a dedicated read-only IBM i user profile with *USE authority on a short list of files and logical files, and no command line access.

Connect from the tool server using the IBM Toolbox JDBC driver (JT400) or IBM i Access ODBC, with SSL enabled, and set the naming and CCSID options so character data converts correctly.

Turn on journaling for the files you want to follow, and use journal-based change capture or a replication product to maintain an off-box reporting copy (PostgreSQL, SQL Server or a second Db2) for large questions.

Rebuild World's security in the tool server: map each World user to allowed menus, files and company or business unit scope, and filter every tool query accordingly.

Index spooled reports, PDFs and shared documents in a local vector store, and serve a local open-weight model with vLLM or Ollama.

Add drafts, then approved write-back through batch input (Z) files and the standard edit programs, never by updating production F-files.

## Sections

### How World stores data and what is safe to read

**Body:**

World keeps data in DB2 for i physical and logical files. Core files share names with EnterpriseOne ancestors: F0101 (Address Book), F4101 and F4102 (Item Master and Branch), F4211 (Sales Order Detail), F4311 (Purchase Order Detail), F0911 (Account Ledger), F4111 (Item Ledger). Field names are short, uppercase and prefixed with the file, for example ABAN8 and ABALPH in F0101. Data is often stored in fixed-width packed or zoned fields, dates in a century-year-day Julian format (2026-10-21 is 126294), and file members and library lists decide which environment you are really reading.

Because the files are real DB2 tables, SQL over JDBC works well for reads. The risk is not technical but semantic: Data Dictionary rules, UDC (user defined code) tables and implied decimals determine what a column means, so the tool layer should map codes to descriptions from the UDC files and apply decimal rules per field. Read logical files (keyed views) where they exist to avoid full table scans.

**Code:**

- -- JDBC (jdbc:as400://ibmi-host/;naming=sql;libraries=PRODDTA)
SELECT ABAN8, ABALPH, ABAT1
FROM   PRODDTA.F0101
WHERE  ABAT1 = 'V'
  AND  UPPER(ABALPH) LIKE UPPER(?) || '%'
FETCH FIRST 25 ROWS ONLY
- -- Julian date helper in the tool layer (CYYDDD)
-- 126294 -> century=1 (2000s), year=26, day-of-year=294 -> 2026-10-21

### Reference architecture for an IBM i estate

**Body:**

Keep the AI stack off the IBM i partition. The tool server and GPU nodes run on Linux servers; the only link to the IBM i is the JDBC or ODBC connection from the tool server, plus a journal-based feed. Journaling (with remote journals or a replication tool) delivers changes to a reporting copy; for small shops a nightly extract is enough. The model never receives raw connection details and never runs on the IBM i.

Documents are the other half. Spooled files, PDFs on the IFS, and shared-drive contracts are extracted, chunked and embedded locally. Each chunk carries a company or business unit label from its path or file naming, which you use as the access filter. For an air-gapped site the Linux nodes sit in the same restricted network as the IBM i, with no internet route.

### Security: World is mostly menu and file level

**Body:**

World security is typically driven by user profiles, menu and action code security, and file or program security, with limited built-in row-level control. That means an AI layer must not assume a database account equals a business user. Use one narrow read-only profile for the connection, then enforce the end user's scope in the tool server using a mapping table you maintain and review with the World security administrator.

Start with data that is low-risk and well understood, such as item availability, open order status and vendor lookup by company. Defer sensitive areas (payroll, costing, margin) until the mapping is proven. Every query runs through a tool that adds the scope filter as a bind parameter, and acceptance testing compares answers for two users with different scope.

### Write-back, sizing and honest limits

**Body:**

World has no REST write API. Supported write paths are the batch input (Z) files such as F0911Z1 for journal entries and the standard edit and update programs, plus any interfaces your team has already built in RPG or CL. The AI layer should draft the payload as a document for a person to review, and only then insert into the batch file for the normal edit program to validate. Never UPDATE production F-files from the tool server.

Sizing is modest: tens to a few hundred daily active users on one or two GPUs for a 30B-class model, with index size driven by documents. Honest limits: World is a mature platform and your people may already rely on queries and green-screen inquiries that are fast enough; some data is encoded in ways that need careful mapping; and if the real goal is a modern UI, migrating to EnterpriseOne may be the better investment than layering AI on World.

## Pitfalls

- Using a powerful IBM i profile for the connection. Use a read-only profile with explicit file authority.
- Mixing environments by library list. Test which library holds production data before every deployment.
- Ignoring Julian dates, implied decimals and UDC code descriptions, which produces plausible but wrong answers.
- Assuming World has row-level security. Rebuild scope in the tool layer and test it.
- Updating F-files directly for write-back instead of using the batch input and edit programs.

## Ai Angle

ERPray connects to DB2 for i with a read-only profile, decodes Julian dates, implied decimals and UDC codes, and applies a mapped scope per user. It shows the SQL behind each answer and drafts, but does not post transactions; it hands them over for approval through your normal World batch process.

## Faq

### Can an LLM query JD Edwards World directly?

**Answer:** Not safely as free-form SQL. A model should call named tools that run parameterised reads over JDBC with a read-only profile, because World's codes, decimals and dates need translation and its security is not row-level.

### Do we need to move off the IBM i first?

**Answer:** No. The AI stack runs on separate Linux servers and reads from the IBM i or a journal-fed copy. The ERP stays where it is, which is the point of keeping the data on site.

### Is JDBC or ODBC better?

**Answer:** Either works. The IBM Toolbox JDBC driver is common for Java and Python bridges; IBM i Access ODBC suits other stacks. Choose based on your tool server language and make sure SSL and CCSID settings are correct.

### What if our World customisations are in RPG?

**Answer:** Treat them as business logic you must not bypass. Read the data they produce, and for writes call or feed through the same programs and batch files rather than updating files directly.

## Search terms

JD Edwards World AI integration, JDE World IBM i LLM, AS/400 ERP AI on-premises, query JD Edwards World JDBC, DB2 for i AI assistant, JD Edwards World chatbot, IBM i journal replication AI, JDE World F0101 query, private AI JD Edwards World

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
