Enterprise-Grade AS/400 Migration

Transform your COBOL into production-ready Java

Automated migration from IBM AS/400 ILE COBOL to modern Java with DB2/PostgreSQL connectivity. Zero manual rewriting. 100% functional compatibility.

309
Programs Converted
1.7M
Lines of COBOL
5.2M+
Lines of Java Generated
95%
Compilation Rate
COBOL (AS/400)
       IDENTIFICATION DIVISION.
       PROGRAM-ID. RH00045C.
      *********************************
       WORKING-STORAGE SECTION.
       01 WK-PRICE   PIC S9(9)V99.
       01 WK-QTY     PIC S9(5).
       LINKAGE SECTION.
       01 LK-ORDER.
          05 LK-ITEM  PIC X(20).
          05 LK-TOTAL PIC S9(11)V99.
       PROCEDURE DIVISION.
           EXEC SQL
             SELECT PRICE INTO :WK-PRICE
             FROM ITEMS
             WHERE ITEM_CODE = :LK-ITEM
           END-EXEC.
           COMPUTE LK-TOTAL =
             WK-PRICE * WK-QTY.
Migration12
Engine
Java (Generated)
public class RH00045C extends CobolProgram {
  protected BigDecimal wkPrice = BigDecimal.ZERO;
  protected BigDecimal wkQty = BigDecimal.ZERO;

  public class LkOrderType {
    protected String lkItem = "                    ";
    protected BigDecimal lkTotal = BigDecimal.ZERO;
  }

  @Override
  public void callableStatement() {
    sqlService.executeQuery(connection,
      "SELECT PRICE FROM ITEMS WHERE ITEM_CODE = ?",
      rs -> { wkPrice = rs.getBigDecimal(1); },
      lkOrder.lkItem);
    CobolMove.move(
      wkPrice.multiply(wkQty), lkOrder, "lkTotal");
  }
}

How It Works

A complete DevOps pipeline to modernize your AS/400 estate — the live demo below is just the beginning

01

Extract

Export your COBOL source, copybooks, and DDS schemas from your AS/400 environment using our step-by-step guide.

  • COBOL source members (.cbl)
  • Copybooks (.cpy)
  • DDS/Table schemas (.json)
  • CL program references
02

Convert

Upload your files and our Migration12 engine transforms IBM ILE COBOL to clean, compilable Java with full SQL support.

  • Automatic type mapping (PIC to Java)
  • SQL/DB2 to JDBC translation
  • CALL chain resolution
  • COPY/REDEFINES handling
03

Validate

Run side-by-side tests comparing original AS/400 output with Java output. Full functional compatibility verification.

  • Automated regression testing
  • Side-by-side output comparison
  • Full compilation verification
  • DB2 + PostgreSQL support
End-to-End DevOps

The Complete Migration Pipeline

Code conversion is just one piece. We deliver a full production-grade migration lifecycle with zero disruption to your running systems.

Automated

Database Migrator

Automated schema translation from DB2/400 physical and logical files to PostgreSQL — including DDS record formats, packed decimals, EBCDIC encoding, and AS/400-specific data types.

  • DB2/400 DDL to PostgreSQL DDL conversion
  • Data type mapping (PACKED, ZONED, DBCS, TIMESTAMP)
  • Index and view migration from logical files
  • Data migration with encoding and collation handling
Automated

Test Generation

Automatic test case generation from production traffic. We capture real AS/400 request/response pairs and generate regression suites that validate every converted program against known-good outputs.

  • Capture production I/O pairs as test fixtures
  • Auto-generate JUnit test suites per program
  • Field-level diff reports on every mismatch
  • CI/CD integration for continuous validation
Benchmarked

Performance Optimizer

Microbenchmark suite that profiles every layer of the migrated stack — JDBC wrappers, runtime overhead, memory allocation — ensuring Java meets or exceeds AS/400 response times.

  • Component-level benchmarking (100K+ iterations)
  • Memory profiling and leak detection
  • JDBC connection pooling optimization
  • Before/after performance reports per program
Extract
Convert
Migrate DB
Double Run
Test Gen
Optimize
Go Live

The Live Demo below lets you experience the conversion engine first-hand — just one step of the complete pipeline.

Try the Converter

Live Demo

Experience the conversion engine in real time — upload your own COBOL or try our demo program

COBOL Source *

Drop your .cbl file here

Copybooks

Drop .cpy/.cbl files here (optional)

DDS Schemas

Drop .json schema files (optional)

AS/400 Extraction Guide

Follow these steps to extract the required files from your IBM AS/400 environment

1

Prerequisites

What you need before starting

AS/400 Access

  • User profile with *ALLOBJ authority (or *USE on source files)
  • Access to STRSQL or IBM Access Client Solutions (ACS)
  • FTP enabled (port 21) or SFTP (port 22)
  • JDBC ports open: 449, 8470-8476

Workstation

  • Java JDK 21 (Eclipse Temurin recommended)
  • Apache Maven 3.8+
  • PostgreSQL 14+
  • 10 GB free disk space, 8 GB RAM

Test Connectivity

# Test AS/400 port 449 (host server mapper)
nc -zv $AS400_HOST 449

# Test FTP
ftp $AS400_HOST

# Test PostgreSQL
psql -h $PG_HOST -p 5432 -U $PG_USER -d $PG_DB -c "SELECT 1"
2

Extract COBOL Source Members

Get your COBOL program source code from AS/400

Step 2.1: Identify COBOL Libraries

-- Run via STRSQL or IBM ACS Run SQL Scripts
SELECT SYSTEM_TABLE_SCHEMA AS LIBRARY,
       SYSTEM_TABLE_NAME AS SOURCE_FILE,
       COUNT(*) AS MEMBER_COUNT
FROM QSYS2.SYSPARTITIONSTAT
WHERE SOURCE_TYPE IN ('CBLLE', 'CBL', 'SQLCBLLE')
GROUP BY SYSTEM_TABLE_SCHEMA, SYSTEM_TABLE_NAME
ORDER BY MEMBER_COUNT DESC;

Step 2.2: Extract via FTP

#!/bin/bash
AS400_HOST="your.as400.host"
LIBRARY="YOUR_LIBRARY"
SRCFILE="QCBLSRC"

while IFS= read -r member; do
  member=$(echo "$member" | tr -d '[:space:]')
  [ -z "$member" ] && continue
  ftp -n $AS400_HOST <<EOF
quote USER $AS400_USER
quote PASS $AS400_PASS
ascii
cd /QSYS.LIB/${LIBRARY}.LIB/${SRCFILE}.FILE
get ${member}.MBR extracted/cobol/${member}.cbl
quit
EOF
  echo "Extracted: $member"
done < members.txt
Tip: The COBOL dialect is IBM ILE COBOL (fixed-format, 80-column). Columns 7-72 are code area.
3

Extract Copybooks

COBOL include files referenced via COPY statements

-- List copybook members
SELECT SYSTEM_TABLE_MEMBER AS MEMBER,
       SOURCE_TYPE AS TYPE,
       NUMBER_ROWS AS LINES
FROM QSYS2.SYSPARTITIONSTAT
WHERE SYSTEM_TABLE_SCHEMA = 'YOUR_LIBRARY'
  AND SOURCE_TYPE IN ('CBLLE', 'CBL', 'CPY', 'SQLCBLLE')
  AND (SYSTEM_TABLE_NAME = 'QCPYSRC'
       OR SYSTEM_TABLE_NAME = 'YOUR_COPYBOOK_FILE')
ORDER BY SYSTEM_TABLE_MEMBER;
Tip: Find which copybooks your program needs:
grep "COPY " your_program.cbl
The IN MYLIB or OF MYLIB clause tells you which library contains each copybook.
4

Extract DDS / Table Schemas

Database file definitions needed for I/O and SQL translation

Generate DDL from AS/400

-- Generate CREATE TABLE DDL for a specific file
CALL QSYS2.GENERATE_SQL(
  DATABASE_OBJECT_NAME => 'MYFILE',
  DATABASE_OBJECT_LIBRARY_NAME => 'YOUR_LIBRARY',
  DATABASE_OBJECT_TYPE => 'TABLE',
  DATABASE_SOURCE_FILE_NAME => 'QSQLSRC',
  DATABASE_SOURCE_FILE_LIBRARY_NAME => 'QTEMP',
  DATABASE_SOURCE_MEMBER => 'TMP',
  REPLACE_OPTION => '1'
);

Extract Column Metadata (JSON)

Use our ExtractDDS tool to generate JSON schema files:

java -cp ".:jt400-21.0.3.jar" ExtractDDS FILE1 FILE2 FILE3

# Produces JSON like:
{
  "RECORDFORMAT": {
    "columns": [
      { "name": "FIELD1", "type": "CHAR", "length": 10 },
      { "name": "FIELD2", "type": "PACKED", "length": 7, "decimals": 2 }
    ]
  }
}
5

Upload & Convert

Use the demo above to see instant results

  1. Upload your .cbl file in the "COBOL Source" area
  2. Add any copybooks your program references
  3. Add DDS schema JSONs for referenced tables
  4. Click Convert to Java
  5. Review the generated Java code and missing file report
  6. Add any missing files and re-convert for a complete result
Note: The converter will indicate which copybooks and schemas are missing for a 100% complete conversion. Iteratively add them until no warnings remain.