This is the build reference for the SteelFrame X IBM i–compatible environment: for every AS/400 program and object type, the compile command, what it produces, and a minimal example — then the common combinations you meet in a real application (screen + program + database, batch reporting, service-program binding). It is written for two readers at once: the IBM i operator who just needs the verb, and the mainframe (z/OS) developer who knows COBOL/CICS/DB2/VSAM and wants the AS/400 equivalent — section A gives that mapping, and each combination in section C is labelled with the mainframe stack it replaces. All commands are entered on the command line after sign-on (or from CL); every recipe below uses verbs this environment actually supports.
If you come from z/OS, almost every technology you know has an IBM i equivalent — usually integrated into the operating system rather than sold as a separate product. This table is the spine of the whole manual; every row is expanded in sections B and C.
| z/OS technology | IBM i equivalent | Compile / create with |
|---|---|---|
| COBOL (batch & online) | ILE COBOL | CRTBNDCBL (or CRTCBLMOD+CRTPGM) |
| — (no direct z/OS peer) | ILE RPG (RPGLE) | CRTBNDRPG — the dominant business language on IBM i, the role COBOL plays on the mainframe |
| JCL (job control) | CL — Control Language | CRTBNDCL / CRTCLPGM; submit with SBMJOB |
| CICS + BMS mapsets | 5250 display files (DSPF) | CRTDSPF — there is no CICS on IBM i; the interactive subsystem + DSPF are the transaction monitor and screen layer |
| VSAM (KSDS/ESDS) | Keyed physical/logical files | CRTPF / CRTLF — there is no VSAM; native DB2-for-i files ARE the keyed data, accessed record-level from RPG/COBOL |
| DB2 (separate subsystem) | DB2 for i (integrated) | RUNSQLSTM for DDL; CRTSQLRPGI for embedded SQL — no BIND step, no plan/package management |
| Easytrieve / SAS (report & extract) | RPG report pgm or SQL | CRTSQLRPGI / RUNSQLSTM (see C.4) |
| IDMS + ADS/Online | DB2 for i + RPG/COBOL + DSPF | no network database on IBM i — relational replaces it (see C.5) |
| Natural + ADABAS | RPG/COBOL + DB2 for i | no inverted-list DB / 4GL — 3GL + relational replaces it (see C.6) |
| HLASM (assembler) | ILE modules / service programs | CRTSRVPGM — assembler is not idiomatic on IBM i; the MI layer is below the covers and low-level work is done as bound ILE modules (see C.7) |
MYLIB), and source lives as members in source physical files
(QRPGLESRC, QCBLLESRC, QCLSRC, QDDSSRC) —
the analogue of PDS members.Convention used below: library MYLIB, source files per language
(QRPGLESRC, QCBLLESRC, QCLSRC, QDDSSRC,
QSQLSRC, QCMDSRC), member name = object name. Create a source file
first if you need one: CRTSRCPF FILE(MYLIB/QRPGLESRC) RCDLEN(112).
The flagship language of the platform. One-step compile, source member → *PGM directly:
CRTBNDRPG PGM(MYLIB/CUSTRPT) SRCFILE(MYLIB/QRPGLESRC) SRCMBR(CUSTRPT)
Produces object CUSTRPT type *PGM in MYLIB; run it with
CALL PGM(MYLIB/CUSTRPT). For multi-module programs use the two-step path
(module then bind — the IBM i analogue of compile + link-edit):
CRTRPGMOD MODULE(MYLIB/CALCMOD) SRCFILE(MYLIB/QRPGLESRC) SRCMBR(CALCMOD) CRTRPGMOD MODULE(MYLIB/MAINMOD) SRCFILE(MYLIB/QRPGLESRC) SRCMBR(MAINMOD) CRTPGM PGM(MYLIB/CUSTRPT) MODULE(MYLIB/MAINMOD MYLIB/CALCMOD)
Legacy fixed-form RPG III source (columns, C-specs, indicators) compiles with the OPM compiler
— still one step, still produces a *PGM:
CRTRPGPGM PGM(MYLIB/SIMPINV) SRCFILE(MYLIB/QRPGSRC) SRCMBR(SIMPINV)
(OPM COBOL likewise: CRTCBLPGM. New work should be ILE; the OPM verbs exist for
the migrated estate.)
Same shape as RPG — one-step to *PGM, or module + bind:
CRTBNDCBL PGM(MYLIB/BILLPOST) SRCFILE(MYLIB/QCBLLESRC) SRCMBR(BILLPOST)
CRTCBLMOD MODULE(MYLIB/GLTOTMOD) SRCFILE(MYLIB/QCBLLESRC) SRCMBR(GLTOTMOD) CRTPGM PGM(MYLIB/GLTOTPGM) MODULE(MYLIB/GLTOTMOD)
COBOL reaches keyed database files through ASSIGN TO DATABASE- file control
(record-level I/O — the VSAM idiom, see C.3) and screens through
COPY DDS-ALL-FORMATS of a display file.
Where z/OS uses JCL decks, IBM i uses CL programs: compiled job-control that can
test conditions, monitor for messages, override files and call programs. Compile to *PGM:
CRTBNDCL PGM(MYLIB/BILLCYCLE) SRCFILE(MYLIB/QCLSRC) SRCMBR(BILLCYCLE)
(CRTCLPGM is the OPM form — same result for plain CL.) A typical driver:
PGM OVRDBF FILE(INVOICE) TOFILE(MYLIB/INVOICE) CALL PGM(MYLIB/BILLPOST) DLTOVR FILE(INVOICE) ENDPGM
Run interactively with CALL, or as batch with
SBMJOB CMD(CALL PGM(MYLIB/BILLCYCLE)) — SBMJOB is the
“submit the JCL” of IBM i (see section D).
The base table: field layouts and (optionally) a key, defined in DDS. The AS/400 answer to both a
VSAM cluster and a DB2 base table — the same object serves record-level I/O and SQL.
Produces a *FILE (PF):
A R CUSTR A CUSNBR 6P 0 A CUSNAM 30A A CUSBAL 9P 2 A K CUSNBR
CRTPF FILE(MYLIB/CUSTMAST) SRCFILE(MYLIB/QDDSSRC) SRCMBR(CUSTMAST)
An index / view / alternate key over one or more physical files (the alternate-index or
DB2-view role). Produces a *FILE (LF):
A R CUSTR PFILE(MYLIB/CUSTMAST) A K CUSNAM
CRTLF FILE(MYLIB/CUSTBYNAM) SRCFILE(MYLIB/QDDSSRC) SRCMBR(CUSTBYNAM)
Compile the PF before its LFs — a logical file cannot be created over a physical file that does not exist yet.
The screen layer: record formats with fields, attributes, indicators and function keys, defined
in DDS. This is the IBM i equivalent of a CICS BMS mapset — but there is no
separate transaction monitor to define it to; the program simply opens the display file as
WORKSTN and does EXFMT. Produces a *FILE (DSPF):
CRTDSPF FILE(MYLIB/CUSTMNTD) SRCFILE(MYLIB/QDDSSRC) SRCMBR(CUSTMNTD)
Report layout in DDS (headings, detail lines, totals, skip/space). Produces a
*FILE (PRTF); program output lands as a spooled file on an output queue:
CRTPRTF FILE(MYLIB/INVLIST) SRCFILE(MYLIB/QDDSSRC) SRCMBR(INVLIST)
Wrap a program in a first-class CL command with prompted, validated parameters (the polish of
a real product). Produces a *CMD whose CPP (command-processing program) is your CL/RPG:
CRTCMD CMD(MYLIB/RUNBILL) PGM(MYLIB/BILLCYCLE) SRCFILE(MYLIB/QCMDSRC) SRCMBR(RUNBILL)
ILE separates compiling (source → *MODULE) from binding
(modules → *PGM or *SRVPGM). A service program is a bound
library of reusable procedures that many programs share — the closest AS/400 analogue to a
callable assembler/utility service or a “copybook of logic”, resolved at bind time
(bind-by-reference, so one fix updates every caller):
CRTRPGMOD MODULE(MYLIB/DATEMOD) SRCFILE(MYLIB/QRPGLESRC) SRCMBR(DATEMOD) CRTSRVPGM SRVPGM(MYLIB/DATESRV) MODULE(MYLIB/DATEMOD) EXPORT(*ALL) CRTPGM PGM(MYLIB/CUSTRPT) MODULE(MYLIB/MAINMOD) BNDSRVPGM(MYLIB/DATESRV)
Callers reach the exports with a bound call (CALLB / prototyped
CALLP in RPG, CALL ... USING of a bound entry in COBOL).
DB2 for i is integrated — there is no separate DB2 subsystem, no BIND, no plan. Two build paths:
(a) SQL DDL as a script — put CREATE TABLE / VIEW / INDEX statements in a source member and run them; SQL tables and DDS physical files are the same kind of object underneath:
RUNSQLSTM SRCFILE(MYLIB/QSQLSRC) SRCMBR(CRTTBLS) COMMIT(*NONE)
(b) Embedded SQL in RPG — source type SQLRPGLE, compiled with the SQL precompiler+compiler in one verb. This replaces the mainframe precompile→compile→BIND chain entirely:
CRTSQLRPGI OBJ(MYLIB/AGERPT) SRCFILE(MYLIB/QRPGLESRC) SRCMBR(AGERPT) COMMIT(*NONE)
CRTSQLCBLI. On SteelFrame X the ILE COBOL compiler accepts
EXEC SQL ... END-EXEC inline, so an embedded-SQL COBOL member compiles with plain
CRTBNDCBL (that is how the BILLIB/i aging report is built). SQL procedures/functions
(SQL PL) are also created through RUNSQLSTM — see the SQL PL
application manuals on the index page.Each recipe below names the z/OS stack it replaces, then gives the complete IBM i build in order. Rule of thumb for order: data first, screens second, programs third, CL last.
Online transaction over the relational database. CICS and BMS both collapse into the display file; DB2 access is embedded SQL with no BIND step:
RUNSQLSTM SRCFILE(MYLIB/QSQLSRC) SRCMBR(CRTTBLS) COMMIT(*NONE) /* tables */ CRTDSPF FILE(MYLIB/CUSTMNTD) SRCFILE(MYLIB/QDDSSRC) SRCMBR(CUSTMNTD) /* screen */ CRTBNDCBL PGM(MYLIB/CUSTMNT) SRCFILE(MYLIB/QCBLLESRC) SRCMBR(CUSTMNT) /* EXEC SQL inside */ CRTBNDCL PGM(MYLIB/CUSTMCL) SRCFILE(MYLIB/QCLSRC) SRCMBR(CUSTMCL) /* driver */ CALL PGM(MYLIB/CUSTMCL)
(On a system with the standard SQL precompiler verbs, the COBOL step is
CRTSQLCBLI OBJ(...) SRCFILE(...) SRCMBR(...) — same result.)
Online transaction over keyed records — VSAM becomes a keyed physical file with logical views, read/written record-level (READ/WRITE/REWRITE by key), no SQL anywhere:
CRTPF FILE(MYLIB/CUSTMAST) SRCFILE(MYLIB/QDDSSRC) SRCMBR(CUSTMAST) CRTLF FILE(MYLIB/CUSTBYNAM) SRCFILE(MYLIB/QDDSSRC) SRCMBR(CUSTBYNAM) CRTDSPF FILE(MYLIB/CUSTMNTD) SRCFILE(MYLIB/QDDSSRC) SRCMBR(CUSTMNTD) CRTBNDCBL PGM(MYLIB/CUSTMNT) SRCFILE(MYLIB/QCBLLESRC) SRCMBR(CUSTMNT)
The classic batch update: keyed file maintenance with ASSIGN TO DATABASE-CUSTMAST,
ORGANIZATION INDEXED file control — the direct VSAM-KSDS idiom:
CRTPF FILE(MYLIB/CUSTMAST) SRCFILE(MYLIB/QDDSSRC) SRCMBR(CUSTMAST) CRTLF FILE(MYLIB/CUSTBYNAM) SRCFILE(MYLIB/QDDSSRC) SRCMBR(CUSTBYNAM) CRTBNDCBL PGM(MYLIB/BILLPOST) SRCFILE(MYLIB/QCBLLESRC) SRCMBR(BILLPOST) SBMJOB CMD(CALL PGM(MYLIB/BILLPOST)) JOB(BILLPOST)
Easytrieve's role — a quick report or extract over the database — is filled on IBM i either by a small RPG report program with embedded SQL, or by a pure SQL script:
CRTPRTF FILE(MYLIB/AGELIST) SRCFILE(MYLIB/QDDSSRC) SRCMBR(AGELIST) CRTSQLRPGI OBJ(MYLIB/AGERPT) SRCFILE(MYLIB/QRPGLESRC) SRCMBR(AGERPT) COMMIT(*NONE) CALL PGM(MYLIB/AGERPT)
…or, for a set-based extract with no program at all:
RUNSQLSTM SRCFILE(MYLIB/QSQLSRC) SRCMBR(AGEQRY) COMMIT(*NONE)
Network database + dialog generator becomes relational database + compiled program + display
file. Sets/records become tables with foreign keys (or PFs with join logical files); the ADS
dialog becomes an RPG or COBOL program driving a DSPF. Build = C.1's recipe with
CRTSQLRPGI (or CRTBNDRPG + CRTLF join views for the
navigational parts).
4GL + inverted-list database becomes 3GL + relational. ADABAS descriptors (searchable fields)
map to logical files / SQL indexes; Natural READ/FIND loops map to keyed RPG I/O or SQL cursors
— use SQL (CRTSQLRPGI) for the set-based parts and record-level I/O
(CRTBNDRPG over PF/LF) for the sequential ones. Build = C.3 or C.4 depending on
which side dominates.
There is no assembler in normal IBM i practice — the machine interface (MI) sits below the covers and low-level, shared, performance-critical routines are written as ILE modules bound into a service program:
CRTRPGMOD MODULE(MYLIB/CVTMOD) SRCFILE(MYLIB/QRPGLESRC) SRCMBR(CVTMOD) CRTSRVPGM SRVPGM(MYLIB/UTILSRV) MODULE(MYLIB/CVTMOD) EXPORT(*ALL)
The classic “COBOL mainline calling an assembler subroutine” becomes an ILE COBOL
module bound against the service program's exports (bound call — resolved at
CRTPGM time, not runtime):
CRTCBLMOD MODULE(MYLIB/MAINMOD) SRCFILE(MYLIB/QCBLLESRC) SRCMBR(MAINMOD) CRTPGM PGM(MYLIB/MAINPGM) MODULE(MYLIB/MAINMOD) BNDSRVPGM(MYLIB/UTILSRV)
Whatever the stack, the build order is always the same:
CRTPF, CRTLF, CRTDSPF, CRTPRTF),
or RUNSQLSTM for the SQL-defined data.CRTRPGMOD / CRTCBLMOD) for anything multi-module
or shared.*PGM / *SRVPGM
(CRTPGM, CRTSRVPGM) — or one-step
CRTBNDRPG / CRTBNDCBL / CRTSQLRPGI for
single-module programs.CRTBNDCL) with OVRDBF for file
redirection, then SBMJOB for the batch runs and optionally
CRTCMD for a prompted front door.Compiles themselves run interactively from the command line, but a full application build is usually a CL program — and long builds or batch cycles are submitted, exactly where a mainframe shop would submit JCL:
PGM /* BUILDALL - full application build */ CRTPF FILE(MYLIB/CUSTMAST) SRCFILE(MYLIB/QDDSSRC) SRCMBR(CUSTMAST) CRTLF FILE(MYLIB/CUSTBYNAM) SRCFILE(MYLIB/QDDSSRC) SRCMBR(CUSTBYNAM) CRTDSPF FILE(MYLIB/CUSTMNTD) SRCFILE(MYLIB/QDDSSRC) SRCMBR(CUSTMNTD) CRTPRTF FILE(MYLIB/AGELIST) SRCFILE(MYLIB/QDDSSRC) SRCMBR(AGELIST) CRTBNDRPG PGM(MYLIB/CUSTMNT) SRCFILE(MYLIB/QRPGLESRC) SRCMBR(CUSTMNT) CRTSQLRPGI OBJ(MYLIB/AGERPT) SRCFILE(MYLIB/QRPGLESRC) SRCMBR(AGERPT) COMMIT(*NONE) CRTBNDCL PGM(MYLIB/NIGHTCL) SRCFILE(MYLIB/QCLSRC) SRCMBR(NIGHTCL) ENDPGM
CRTBNDCL PGM(MYLIB/BUILDALL) SRCFILE(MYLIB/QCLSRC) SRCMBR(BUILDALL) SBMJOB CMD(CALL PGM(MYLIB/BUILDALL)) JOB(BUILDALL)
Check results with WRKOBJ MYLIB/*ALL (does the object exist?),
WRKSPLF (compile listings and reports), and WRKACTJOB /
WRKSBMJOB for the submitted job. A failed compile leaves a message in the joblog
(DSPJOBLOG) — the equivalent of reading the JES output.
| You want | Command | Produces |
|---|---|---|
| ILE RPG program (one step) | CRTBNDRPG | *PGM |
| ILE RPG module (for binding) | CRTRPGMOD | *MODULE |
| RPG III / OPM program | CRTRPGPGM | *PGM |
| ILE COBOL program (one step) | CRTBNDCBL | *PGM |
| ILE COBOL module | CRTCBLMOD | *MODULE |
| OPM COBOL program | CRTCBLPGM | *PGM |
| CL program (job control) | CRTBNDCL / CRTCLPGM | *PGM |
| Bind modules into a program | CRTPGM | *PGM |
| Service program (shared procedures) | CRTSRVPGM | *SRVPGM |
| Physical file (table / keyed data) | CRTPF | *FILE (PF) |
| Logical file (index / view) | CRTLF | *FILE (LF) |
| Display file (5250 screen) | CRTDSPF | *FILE (DSPF) |
| Printer file (report layout) | CRTPRTF | *FILE (PRTF) |
| Source physical file | CRTSRCPF | *FILE (source) |
| Command definition | CRTCMD | *CMD |
| Run SQL DDL / script | RUNSQLSTM | tables, views, indexes, SQL routines |
| Embedded-SQL RPG (SQLRPGLE) | CRTSQLRPGI | *PGM |
| Embedded-SQL COBOL | CRTSQLCBLI ¹ | *PGM |
| Submit a batch job | SBMJOB | batch job on a job queue |
| Redirect a file for one job | OVRDBF | (override, not an object) |
¹ standard IBM i verb; on SteelFrame X, CRTBNDCBL
compiles embedded EXEC SQL COBOL directly (see B.11).