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.
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
all implemented (Phase 0)
(dispatcher; Java a later option)
lexer + IR + emit, incl. compile-and-run
variant auto-detection
static executable — no runtime
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):
+/- continuation, labels, KWD(val) params, OPM/ILE detectpc state machineTwo 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.
| Target | What it gives you |
|---|---|
| bash | Closest 1:1 to CL’s command-orchestration nature. Readable, reviewable, runs on any Linux today. CHGVAR → assignment / $(( )) arithmetic, IF COND(…) → [ … ] test, SNDPGMMSG → printf. |
| Rust | One static binary, no runtime — the strongest hardware-independence story. Infers types from DCL: *DEC → i64/f64, *CHAR → String, *LGL → bool. |
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 structure
PGM/ENDPGM, parameters,DCL(typed variables),DCLF(file declarations) - Control flow
IF COND(…) THEN(…),ELSE,DO/ENDDOblocks,GOTO+ labels - Logic & calls
CHGVARassignments / 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
RCVFrecord I/O,MONMSGmessage 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
| Status | Phase 0 prototype — pipeline complete, runnable demo, not yet GA |
|---|---|
| Platform | AS/400 / IBM i Control Language (OPM CLP and ILE CLLE) |
| Targets | bash (today), Rust single binary (today); Java under consideration |
| Engagement | Early-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
