IBM Merlin and VS Code for IBM i Development in 2026: Modern IDE Setup, RPG and CL Editing, Git Integration, and the IBM i Developer Workstation

The previous post covered IBM i work management in depth — designing subsystem descriptions, configuring routing entries with ADDRTGE, setting class objects for CPU priority and time slice with CRTCLS, managing job queue concurrency with ADDJOBQE, understanding multi-threaded jobs, and diagnosing performance problems with WRKACTJOB and Collection Services. This post covers the modern IBM i developer workstation: IBM Merlin and the VS Code extension for IBM i — how to set up VS Code for RPG and CL editing with syntax highlighting, inline error feedback, Git integration, custom build actions, and AI coding assistance in 2026.

The IBM i Developer Tooling Problem

SEU (Source Entry Utility) has been the standard IBM i editor since the AS/400 was introduced in 1988. It is accessible from a 5250 green-screen session via PDM (Programming Development Manager) and STRSEU. SEU works, but it has significant limitations by 2026 standards:

  • No syntax highlighting — all source members display in a single colour
  • No code completion or IntelliSense — no suggestions for built-in functions, operation codes, or field names
  • No Git integration — source members live in QSYS.LIB, not in a Git repository
  • No pull request workflow — code review is informal or relies on separate change management tools
  • No linting or static analysis at edit time — errors only appear after compilation
  • Column-oriented fixed-format RPG is visible as a sequence of numbered columns (1–80), which is confusing for developers who learned on modern languages

IBM Rational Developer for i (RDi) was the Eclipse-based successor for many shops, offering syntax highlighting and a GUI-based debugger. But RDi is licensed separately and is heavyweight for individual developers. The 2026 alternative is VS Code with the Code for IBM i extension, which is free, lightweight, and actively maintained by the open-source community.

Code for IBM i — the VS Code Extension

Code for IBM i (extension ID: HalcyonTechLtd.code-for-ibmi) by Halcyon Technology is available from the VS Code Marketplace at no cost. It provides:

  • SSH-based connection to IBM i — connects to the IBM i PASE shell over SSH (port 22); no separate middleware required
  • IBM i Browser panel — a tree view of QSYS.LIB libraries, source physical files, and source members; IFS directory browsing; object list with filter by library and type
  • Source member editing — open RPG, CL, DDS, and SQL source members directly in the VS Code editor; changes are saved back to the source physical file on IBM i
  • Syntax highlighting — full syntax colouring for free-format RPG IV (/FREE), fixed-format RPG IV, CL, DDS, and SQL
  • Actions (compile and run) — user-defined actions execute CL commands against the open member (CRTBNDRPG, CRTCLPGM, CRTSQLRPGI, etc.) and parse the resulting EVFEVENT file to display compilation errors inline in the editor
  • EVFEVENT-based error feedback — after a compile action, errors from the EVFEVENT file appear as red squiggles and hover messages at the exact source line that caused the error
  • Integrated terminal — a PASE SSH terminal directly in VS Code for running CL commands, SBMJOB, or PASE shell scripts without switching windows

Setting Up the VS Code Connection

Prerequisites on the IBM i before configuring VS Code:

  • SSH daemon running: STRTCPSVR SERVER(*SSHD) (and add to the autostart configuration)
  • PASE installed (5770-SS1 option 33)
  • An IBM i user profile with *ALLOBJ or at minimum authority to the source libraries to be edited

In VS Code, install the extension, then open the IBM i connection panel (the power plug icon in the Activity Bar) and add a new connection:

Host:        my-ibm-i.company.com
Port:        22
Username:    DEVUSER
Auth:        Password or SSH private key (recommended)

After connecting, configure the connection settings in VS Code (the gear icon next to the connection):

// .vscode/settings.json (or in VS Code user settings for this IBM i connection)
{
  "code-for-ibmi.connectionSettings": {
    "libraryList": ["APPLIB", "SALESLIB", "ORDLIB", "QTEMP"],
    "currentLibrary": "APPLIB",
    "defaultDeploymentMethod": "compare",
    "autoSaveBeforeAction": true,
    "showDescInLibList": true
  }
}

Test the connection by opening the IBM i Browser and expanding a library to see its source physical files and members. Right-click any source member to open it in the editor.

Editing and Compiling RPG in VS Code

Open a free-format RPG IV member (RPGLE) from the IBM i Browser. The editor provides syntax highlighting, with keywords in one colour, built-in functions in another, and comments in a third. Error squiggles appear after each compile action.

A simple free-format RPG service program procedure edited in VS Code:

**FREE
// APPLIB/ORDSRV — Order validation service program
// Compile: CRTBNDRPGM PGM(APPLIB/ORDSRV) SRCFILE(APPLIB/QRPGLESRC)
//                     SRCMBR(ORDSRV) DFTACTGRP(*NO) ACTGRP(ORDGRP)

ctl-opt nomain thread(*concurrent);

dcl-pr ValidateOrder extproc('ValidateOrder');
  pOrderNo    packed(9:0)  const;
  pCustNo     packed(9:0)  const;
  pOrderAmt   packed(13:2) const;
  pRetCode    char(2);
  pRetMsg     char(100);
end-pr;

dcl-proc ValidateOrder export;
  dcl-pi *n;
    pOrderNo    packed(9:0)  const;
    pCustNo     packed(9:0)  const;
    pOrderAmt   packed(13:2) const;
    pRetCode    char(2);
    pRetMsg     char(100);
  end-pi;

  dcl-s wCustSts  char(1);
  dcl-s wCrdLmt   packed(13:2);

  // Validate customer exists and is active
  exec sql
    SELECT CUSSTS, CRDLMT
    INTO   :wCustSts, :wCrdLmt
    FROM   ORDLIB.CUSTMST
    WHERE  CUSNO = :pCustNo;

  if sqlcode  0;
    pRetCode = 'CE';
    pRetMsg  = 'Customer not found or inactive';
    return;
  endif;

  if wCustSts  'A';
    pRetCode = 'CI';
    pRetMsg  = 'Customer account is not active';
    return;
  endif;

  if pOrderAmt > wCrdLmt;
    pRetCode = 'CL';
    pRetMsg  = 'Order amount exceeds customer credit limit';
    return;
  endif;

  pRetCode = 'OK';
  pRetMsg  = 'Order validated successfully';
end-proc;

To compile from VS Code, right-click the member in the IBM i Browser or use the command palette (Ctrl+Shift+P) and select IBM i: Run Action. The built-in CRTBNDRPG action compiles the member and populates the Problems panel with any errors. Errors also appear as inline squiggles with hover text showing the IBM i compiler message.

IBM Merlin

IBM Merlin (full name: IBM Developer for z/OS and IBM i — Merlin edition) is IBM’s enterprise-grade IDE for IBM i, built on an Eclipse Theia / VS Code foundation and deployed as a container workload (typically on OpenShift or a standalone Docker host). Developers access Merlin through a browser — no local VS Code installation required.

What Merlin adds over plain VS Code with Code for IBM i:

  • AI-assisted code completion for RPG — Merlin integrates with IBM watsonx Code Assistant for Z, which has been trained on RPG source. Completions include procedure calls, data structure declarations, and SQL embedded in RPG. Quality has improved significantly from 2024 to 2026 but still requires review for complex logic.
  • RPG refactoring tools — extract procedure, rename field, convert fixed-format to free-format (the converter is more reliable than the standalone CVTRPGSRC command)
  • Team administration features — centralised connection management means a single admin configures IBM i connections and all developers connect through Merlin without individual SSH key management
  • ARCAD integration — Merlin integrates with ARCAD for IBM i for change management, impact analysis, and build orchestration in regulated environments (financial services, government)
  • Built-in Git UI — a graphical Git interface for branching, committing, and pull request creation without command-line Git knowledge

Who should use Merlin versus VS Code + Code for IBM i:

  • Use Merlin — large teams (10+ IBM i developers), regulated industries needing ARCAD or formal change management, organisations that want to provide a browser-based IDE without individual workstation configuration, shops adopting watsonx Code Assistant for RPG modernisation
  • Use VS Code + Code for IBM i — individual developers, small teams, open-source contributors, shops that want the full VS Code ecosystem (extensions, themes, keybindings) without a container deployment, developers already familiar with VS Code from other languages

Git Integration for IBM i Source

Putting IBM i source under Git version control is the single most impactful change a team can make for code quality and collaboration. There are two approaches:

Approach A: IFS stream files + SRCSTMF — store source as stream files in the IFS (e.g., /home/devuser/project/src/ORDSRV.sqlrpgle), edit in VS Code, and compile using the SRCSTMF parameter on CRTBNDRPG:

/* Compile from IFS stream file instead of a source physical file member */
CRTBNDRPG PGM(APPLIB/ORDSRV)
          SRCSTMF('/home/devuser/project/src/ORDSRV.sqlrpgle')
          DFTACTGRP(*NO)
          ACTGRP(ORDGRP)
          DBGVIEW(*SOURCE)

With stream files, standard Git commands work in the PASE terminal or in VS Code’s integrated Git panel:

# In a PASE SSH terminal (or VS Code terminal)
cd /home/devuser/project
git init
git remote add origin git@github.com:mycompany/ibmi-app.git

# After editing ORDSRV.sqlrpgle in VS Code:
git add src/ORDSRV.sqlrpgle
git commit -m "feat: add credit limit validation to ValidateOrder"
git push origin main

Approach B: Code for IBM i Git sync — use the built-in Git integration in Code for IBM i, which automatically mirrors member changes to a local Git working tree. The extension manages the conversion between source member records and stream file lines. This approach is simpler to set up but Approach A (SRCSTMF) is the cleaner long-term solution as it eliminates source physical files entirely.

Actions and Build Automation in VS Code

Code for IBM i actions are defined in .vscode/actions.json within the project directory (synced to IFS), or globally in the VS Code user settings. Each action is a CL command string with substitution variables that refer to the currently open member.

// .vscode/actions.json — custom IBM i actions for this project
[
  {
    "name": "Compile RPGLE (CRTBNDRPG)",
    "command": "CRTBNDRPG PGM(&LIBRARY/&NAME) SRCSTMF('&RELATIVEPATH') DFTACTGRP(*NO) ACTGRP(ORDGRP) DBGVIEW(*SOURCE) OPTION(*EVENTF)",
    "environment": "ile",
    "extensions": ["RPGLE", "SQLRPGLE"]
  },
  {
    "name": "Compile CL Program (CRTCLPGM)",
    "command": "CRTCLPGM PGM(&LIBRARY/&NAME) SRCSTMF('&RELATIVEPATH') OPTION(*EVENTF)",
    "environment": "ile",
    "extensions": ["CLP", "CLLE"]
  },
  {
    "name": "Run RPGUnit Test Suite",
    "command": "RUCALLTST TSTPGM(&LIBRARY/&NAME) RPTTYPE(*ALLWAYS) OUTPUT(*PRINT)",
    "environment": "ile",
    "extensions": ["RPGLE"]
  },
  {
    "name": "Submit Batch Job",
    "command": "SBMJOB JOB(&NAME) JOBQ(APPLIB/APPJOBQ) CMD(CALL PGM(&LIBRARY/&NAME)) JOBPTY(5)",
    "environment": "ile",
    "extensions": ["RPGLE"]
  },
  {
    "name": "Deploy IFS project to APPLIB",
    "command": "CPYFRMSTMF FROMSTMF('/home/devuser/project/deploy/&NAME.savf') TOMBR('/QSYS.LIB/APPLIB.LIB/&NAME.SAVF') MBROPT(*REPLACE)",
    "environment": "ile",
    "extensions": ["SAVF"]
  }
]

The &LIBRARY, &NAME, &RELATIVEPATH, and &FULLPATH substitution variables are replaced at runtime with values from the currently open file. This makes actions reusable across all members in the project without per-file configuration.

AI Coding Assistance for RPG

GitHub Copilot in VS Code provides code completion suggestions for RPG IV source files stored as stream files (.sqlrpgle, .rpgle). Because the files have standard extensions, Copilot treats them as source files and provides completions based on context. Copilot’s training data contains less RPG than Python or JavaScript, so the quality of suggestions varies:

  • Works well — data structure declarations, SQL embedded in RPG (Copilot has strong SQL training data), boilerplate procedure stubs, DCL-DS/DCL-PR/DCL-PI patterns, and common built-in functions like %TRIM, %EDITC, %DATE, %SUBST
  • Needs review — complex business logic, indicator handling, legacy fixed-format constructs, program-to-program CALL patterns; completions may be syntactically plausible but logically incorrect
  • Not reliable — ILE binding directory and activation group patterns, CL command parameters, DDS field definitions

Enable GitHub Copilot for RPG in VS Code settings:

// In VS Code settings.json
{
  "github.copilot.enable": {
    "*": true,
    "rpgle": true,
    "sqlrpgle": true,
    "clle": true,
    "clp": true
  }
}

IBM Merlin’s watsonx Code Assistant integration provides RPG-specific AI explanations — select a procedure in Merlin and request an explanation of what it does. This is especially useful during modernisation projects where teams are reading legacy fixed-format RPG written by developers who left the organisation years ago.

The 2026 IBM i Developer Workstation

The recommended full setup for a modern IBM i development team in 2026:

  • VS Code — primary editor on the developer’s laptop (Windows, macOS, or Linux)
  • Code for IBM i extension (HalcyonTechLtd.code-for-ibmi) — IBM i connection, source member browsing, and compile actions
  • RPGUnit extension — run unit tests for RPG service programs directly from VS Code
  • Git in PASE on IBM i — installed via yum (yum install git); manages the IFS source tree on the server side
  • GitHub or GitLab — remote Git repository for source control, pull requests, and code review; use SSH key authentication from PASE
  • Bob (Better Object Builder) — an open-source build tool for IBM i (github.com/ibm/ibmi-bob) that reads a Rules.mk file and compiles only changed members in dependency order; replaces manual CRTBNDRPG sequences in CI pipelines
  • GitHub Actions or Jenkins CI with an IBM i runner — automated builds triggered by pull request merges; the runner connects to IBM i via SSH, runs Bob, and reports compile errors back to the pull request

A minimal Bob Rules.mk for an application with RPG service programs and a main program:

# Rules.mk — Bob build rules for APPLIB application
# Bob reads this file and resolves compile order from dependencies

ORDSRV.SRVPGM: ORDSRV.RPGLE
	$(CRTBNDRPG) DFTACTGRP(*NO) ACTGRP(ORDGRP) DBGVIEW(*SOURCE)

CUSTSRV.SRVPGM: CUSTSRV.RPGLE
	$(CRTBNDRPG) DFTACTGRP(*NO) ACTGRP(ORDGRP) DBGVIEW(*SOURCE)

ORDAPP.PGM: ORDAPP.RPGLE ORDSRV.SRVPGM CUSTSRV.SRVPGM
	$(CRTBNDRPG) DFTACTGRP(*NO) ACTGRP(ORDGRP) BNDDIR(APPLIB/ORDBNDD) DBGVIEW(*SOURCE)

A GitHub Actions workflow that compiles on every push to main:

# .github/workflows/ibmi-build.yml
name: IBM i Build

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: self-hosted   # IBM i runner registered as a GitHub Actions runner

    steps:
      - name: Checkout source
        uses: actions/checkout@v4

      - name: Copy source to IFS
        run: |
          rsync -av src/ /home/ciuser/project/src/

      - name: Run Bob build
        working-directory: /home/ciuser/project
        run: |
          /QOpenSys/usr/local/bin/makei build
        env:
          CURLIB: APPLIB

      - name: Run RPGUnit tests
        working-directory: /home/ciuser/project
        run: |
          system "RUCALLTST TSTPGM(APPLIB/ORDSRVTST) RPTTYPE(*ALLWAYS)"

This setup — VS Code editing RPG stream files, Git for source control, Bob for automated builds, and GitHub Actions for CI — gives IBM i a development workflow indistinguishable from a modern web application project. The platform that started in 1988 now supports pull requests, code review, automated testing, and continuous integration using the same tools as any other language in 2026.

Next post: IBM i PASE Deep Dive — understanding the PASE runtime environment, AIX binary compatibility, PASE vs QShell (QSH), environment variables, PASE process management, shared libraries, and how PASE integrates with the IBM i job structure and ILE activation groups.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top