Vanthrex for IBM i

One sidebar for everything you do on IBM i: connect, browse, edit, compile, query, monitor and fix — with checks while you type, an AI assistant, Git and a call graph built in. In VS Code, without a green screen.

Install from the Marketplace Get started Try the examples See what it does
Version 3.3.0Free · MIT LicenseRPG · CL · SQL · DDS · COBOL8 languages
50+checks while you type
680+commands
4languages checked: RPG, CL, SQL, DDS
8interface languages

What you can do

See what it does

Real examples: the code you write, what Vanthrex tells you and what it writes for you.

Bugs found while you type

More than 50 checks for RPG, CL, SQL and DDS run as you type and land in Problems: literals that are cut, array indexes out of range, numeric overflow, wrong argument counts, CHAIN without %FOUND, UPDATE without WHERE…

Read more →

ORDERS.rpgle
dcl-s custName char(10);dcl-s lines    char(3) dim(5);custName = 'ACME CORPORATION';lines(6) = 'X';chain (custNo) custmast;
Problems
!This literal has 16 characters but custName holds 10: it is cut.literal-too-long
✕lines has 5 elements: index 6 is outside 1-5 (error RNX0121 at run time).index-out-of-range
!CHAIN without a %FOUND test: the code goes on as if the record was found.chain-without-found

The fix is one click away

Press Ctrl+. on a warning: Vanthrex writes the missing code for you — an IF NOT %FOUND test, an SQLCODE test, CONST on a parameter, the missing CTL-OPT — or turns the check off.

Read more →

Before
ORDERS.rpgle
chain (custNo) custmast;dsply custName;
💡 Quick fix (Ctrl+.): Add an IF NOT %FOUND test
After
ORDERS.rpgle
chain (custNo) custmast;if not %found(custmast);  // not foundendif;dsply custName;

Suggestions while you type

The next line an IBM i developer would write appears in grey: IF %FOUND after CHAIN, an SQLCODE test after embedded SQL, MONMSG after CHKOBJ. Press Tab to accept.

Read more →

SUGGEST.rpgleTab to accept
dcl-f custmast keyed;dcl-s custNo packed(7:0);chain (custNo) custmast;if %found(custmast);

Modernize in one command

Convert Fixed Format to Free turns H, F, D, P and C specs into free form; what needs a decision is kept as a // TODO. IF / ELSEIF becomes SELECT / WHEN just as fast.

Read more →

Before
FIXED.rpgle
FCUSTMAST  IF   E           K DISKD custNo          S              7P 0C     custNo        CHAIN     CUSTMASTC                   IF        %FOUND(CUSTMAST)C                   ADD       1             countC                   ENDIF
After
FIXED.rpgle
dcl-f CUSTMAST keyed;dcl-s custNo packed(7:0);chain custNo CUSTMAST;if %FOUND(CUSTMAST);  count += 1;endif;

CL checked and formattedCL

Undeclared variables, labels that do not exist, values too long, hard-coded libraries — and Shift+Alt+F puts CL in the prompter layout.

Read more →

NIGHTLY.clle
DCL VAR(&MSG) TYPE(*CHAR) LEN(5)CHGVAR VAR(&MSG) VALUE('Nightly run started')CHKOBJ OBJ(PRODLIB/ORDERS) OBJTYPE(*FILE)IF COND(&COUNT *GT 0) THEN(DO)  GOTO CMDLBL(FINISH)ENDDO
Problems
!19 characters do not fit in &MSG (LEN 5): the end is cut.cl-value-too-long
iLibrary PRODLIB is written in the command: use *LIBL (or a variable) so the program runs in test and production.cl-hardcoded-library
✕&COUNT is not declared: add DCL VAR(&COUNT) TYPE(…) at the start of the program.cl-undeclared-variable
✕There is no label FINISH: in this program.cl-undefined-label
💡 Quick fix: Declare &COUNT

Format Document for CLNew in 3.1

Labels in column 1, commands in column 14, parameters from column 25 and long commands split with + before column 80.

Read more →

Before
MONTHEND.clle
PGM PARM(&LIB)DCL VAR(&LIB) TYPE(*CHAR) LEN(10)START: CHKOBJ OBJ(&LIB/ORDERS) OBJTYPE(*FILE)MONMSG MSGID(CPF9801) EXEC(GOTO CMDLBL(END))CPYF FROMFILE(&LIB/ORDERS) TOFILE(QTEMP/ORDERS) MBROPT(*REPLACE) CRTFILE(*YES)END: ENDPGM
After
MONTHEND.clleShift+Alt+F
             PGM        PARM(&LIB)             DCL        VAR(&LIB) TYPE(*CHAR) LEN(10)START:       CHKOBJ     OBJ(&LIB/ORDERS) OBJTYPE(*FILE)             MONMSG     MSGID(CPF9801) EXEC(GOTO CMDLBL(END))             CPYF       FROMFILE(&LIB/ORDERS) TOFILE(QTEMP/ORDERS) +                          MBROPT(*REPLACE) CRTFILE(*YES)END:         ENDPGM

Safe SQL scriptsSQL

DELETE or UPDATE without WHERE, = NULL that is never true and statements that cannot be undone are flagged before you run the script.

Read more →

cleanup.sql
-- Monthly clean-upDELETE FROM ORDERS;UPDATE CUSTOMER SET REGION = 'EU' WHERE COUNTRY = NULL;DROP TABLE OLD_ORDERS;
Problems
!DELETE without WHERE changes every row of the table. Add a WHERE (or WHERE 1 = 1 if that is really what you want).sql-without-where
!= NULL is never true: use IS NULL.sql-equals-null
iThis statement cannot be undone: check the system and the library first (and keep a copy of the data).sql-irreversible

DDS checked tooNew in 3.1

Physical, logical, display and printer files: names too long, decimals larger than the length, fields outside the screen, fields on top of each other, names declared twice.

Read more →

CUSTDSP.dspf
     A                                      DSPSIZ(24 80 *DS3)     A          R CUSTSCREEN     A            CUSTNO         7Y 0B  3 20     A            CUSTNAME      40A  O  3 24     A            AMOUNT         5Y 7O  5 20     A            COMMENT       30A  O  7 60
Problems
!CUSTNAME overlaps CUSTNO (line 4) on screen line 3.dds-overlap
✕AMOUNT has 7 decimal positions but a length of 5.dds-decimals
✕COMMENT at line 7 position 60 (length 30) does not fit on a 24 × 80 screen.dds-off-screen

Share a line with a linkNew in 3.1

Copy a Link That Opens This Line: whoever clicks it opens the same member at the same line. In every terminal, members, message IDs and IFS paths are clickable.

Read more →

Copy a Link That Opens This Linepaste it in a ticket or a chat
vscode://gauravgupta0612.vanthrex-ibmi/open?system=DEV400&member=APPLIB%2FQRPGLESRC%2FORDERS&type=rpgle&line=19
TerminalCtrl+click to open or explain
> CRTBNDRPG PGM(APPLIB/ORDERS) SRCFILE(APPLIB/QRPGLESRC(ORDERS))  RNF7030 The name or indicator CUSTNAM is not defined.  See /home/dev/build/orders.log for details.

One set of rules for the teamTeam

Team coding standards in the workspace settings (or imported from your rpglint.json), checked while you type and in the code health report of a whole library.

Read more →

.vscode/settings.jsonshared by the whole team
"vanthrex.standards": {  "qualifiedDs": true,  "noGlobalsInProcedures": true,  "noGlobalSubroutines": true,  "procedureDescription": true}
Try it on your own machine. Sample RPG, CL, SQL and DDS sources — no IBM i needed.

Start in five minutes

  1. Install the extension from the Marketplace, or run code --install-extension gauravgupta0612.vanthrex-ibmi.
  2. Check the IBM i: usually only the SSH server is needed (STRTCPSVR SERVER(*SSHD)).
  3. Create your first connection with the guided form and Test connection.
  4. No IBM i at hand? Try it with examples: sample sources to see the checks and conversions offline.
  5. Coming from Code for IBM i? Import your setup in one step.
  6. Press Ctrl+Alt+A in any source to see every tool that fits it, and learn the keyboard shortcuts.

Something not working? See Troubleshooting and the FAQ.


Current version: 3.3.0 · What’s new · Changelog · Free and open source under the MIT License.