Phase 0 prototype · early access · standalone product

SlimeCL — AS/400 Control Language Modernizer

CL is the glue of every IBM i (AS/400) shop. SlimeCL transpiles it into portable bash or a single-binary Rust program — so the orchestration layer keeps its behavior while running on commodity hardware.

Control Language declares variables and files, calls RPG / COBOL programs, submits jobs, monitors messages, and drives the batch flow. When an IBM i estate is modernized, the application code gets attention — but the CL that holds the whole shop together is the part nobody wants to touch. SlimeCL reads CL faithfully and re-expresses it as readable, reviewable code, so the job/process layer moves forward by continuity, not by rewrite.

Status: this is an honest Phase 0 prototype. The full lexer → IR → emitter pipeline is implemented and self-tested, with a runnable end-to-end demo (below). It is not a GA product yet: file-driven runtime semantics (RCVF record I/O, MONMSG message monitoring) are still placeholders, and command coverage is being widened corpus-by-corpus. We publish the real state rather than a polished promise.

Where it stands today

3 stages
CL1 lexer → CL2 Slot IR → CL6 emitter
all implemented (Phase 0)
2 targets
CL6 emits bash and Rust
(dispatcher; Java a later option)
15 / 15
automated tests passing
lexer + IR + emit, incl. compile-and-run
OPM + ILE
CLP (OPM) & CLLE (ILE)
variant auto-detection
single binary
Rust target compiles to one
static executable — no runtime
Rust + WASM
house stack: no external libs
auditable, reproducible

CL1 → CL2 → CL6 pipeline

SlimeCL follows the same staged shape proven across the JAVATEL transpiler family (lexer → language-agnostic Slot IR → target emitter):

CL Lexercomments, +/- continuation, labels, KWD(val) params, OPM/ILE detect
Slot IRPGM params, DCL/DCLF, label-delimited segments, nested IF / DO
EmitterSlot IR → bash / Rust (dispatcher), GOTO via a pc state machine

Two targets, one faithful model

CL is a labeled-statement language with GOTO — which neither bash nor safe Rust has. Rather than approximate it, SlimeCL reproduces it exactly with a small program-counter (pc) state machine: each label becomes a dispatch arm, GOTO sets the next label, and fall-through is explicit. The control flow is preserved, not guessed.

TargetWhat it gives you
bashClosest 1:1 to CL’s command-orchestration nature. Readable, reviewable, runs on any Linux today. CHGVAR → assignment / $(( )) arithmetic, IF COND(…)[ … ] test, SNDPGMMSGprintf.
RustOne static binary, no runtime — the strongest hardware-independence story. Infers types from DCL: *DECi64/f64, *CHARString, *LGLbool.

End-to-end demo (real output)

A self-contained CL program that sums 1..&N using a GOTO loop, transpiled to bash and run as-is:

/* COUNTDOWN - sums 1..&N, no file/CALL */
             PGM        PARM(&N)
             DCL        VAR(&SUM) TYPE(*DEC) LEN(10 0) VALUE(0)
 LOOP:       IF         COND(&I *GT &N) THEN(GOTO CMDLBL(DONE))
             CHGVAR     VAR(&SUM) VALUE(&SUM + &I)
             GOTO       CMDLBL(LOOP)
 DONE:       SNDPGMMSG  MSG(&SUM)
             ENDPGM

# → slimecl --emit bash countdown.clp  →  runs on Linux:
#   bash countdown.sh 5    → 15
#   bash countdown.sh 100  → 5050
# The Rust target compiles to one static binary with the same result.

What SlimeCL reads today

  • Program structurePGM / ENDPGM, parameters, DCL (typed variables), DCLF (file declarations)
  • Control flowIF COND(…) THEN(…), ELSE, DO/ENDDO blocks, GOTO + labels
  • Logic & callsCHGVAR assignments / expressions, CALL PGM(…) PARM(…), RETURN
  • Messaging (parsed)MONMSG, SNDPGMMSG — captured in the IR; runtime modeling is on the roadmap
  • Lexical fidelity/* */ comments, +/- line continuation, quoted literals, &-variables, *-special values

Roadmap

  • Now (Phase 0)CL1 lexer + CL2 Slot IR + CL6 bash/Rust emit; self-contained programs transpile and run end-to-end
  • NextCL2 expression parsing for decimal arithmetic + string comparison; widen command coverage (SBMJOB, OVRDBF, RTV*, CRT*/DLT*)
  • ThenRuntime modeling of RCVF record I/O, MONMSG message monitoring and data queues, so file-driven CL runs end-to-end
  • ValidationCL corpus + clean-lex benchmark, published with honest pass-rate tiers (lex / IR / emit / run) — the same transparency we apply across the family

Availability

StatusPhase 0 prototype — pipeline complete, runnable demo, not yet GA
PlatformAS/400 / IBM i Control Language (OPM CLP and ILE CLLE)
Targetsbash (today), Rust single binary (today); Java under consideration
EngagementEarly-access PoC on your own CL — please get in touch. Pricing and GA finalized after PoC validation.

Related products

Request an early-access PoC See SlimeJCL (mainframe JCL) LANGUAGE products All products