Visual Studio Code for IBM i - Important Config Files

What are all these darn config files?

VS Code for IBM i uses Source Orbit and BOB the Better Object Builder, which means we have several different config files to understand. Throw Git into the mix and we have even more config files. 

Let's have a look at my json, rules and git configs:

.env - The Project Explorer Variables Config

LIBL=QTEMP NICKLITTEN QGPL
lib1=NICKLITTEN
CURLIB=NICKLITTEN
dot env

.gitignore - The Git Config

**/.deps
**/.evfevent
**/.logs
**/.DS_Store
.project
.env
dot gitignore

.ibmi.json - The Compile Codepage Config

{
    "version": "0.0.1",
    "build": {
        "tgtCcsid": "37"
    }
}
dot ibmi json

.iproj.json - The Project Explorer Config

{
 "version": "0.0.1",
 "description": "Nick Litten Public VSCode Stuff",
 "objlib": "&lib1",
 "curlib": "&lib1",
 "includePath": [
    "includes",
    "QPROTOSRC"
 ],
 "preUsrlibl": [
    "&lib1"
 ],
 "postUsrlibl": [],
 "setIBMiEnvCmd": [],
 "repository": "https://github.com/NickLitten/nick.litten.public.git",
 "compileCommand": "/QOpenSys/pkgs/bin/makei c -f {filename}",
 "buildCommand": "/QOpenSys/pkgs/bin/makei build"
}
dot iproj json

Rules.mk - the config for compiles in this folder

  • Every folder that has source code in it, needs a Rules.mk file. 
  • The root Rules.mk tells BOB what folders contain source code.

So my root Rules.mk looks like this:

SUBDIRS = sample-code

This literally says look for IBM i Source code in the 'sample-code' folder

Then within the source folder itself it looks like this:

HELLOWORLD.PGM:    HELLOWORLD.PGM.RPGLE

This says compile the source code called helloworld.pgm.rpgle as an ILE program called HELLOWORLD.

If the source file name does not contain the .pgm. and was just called helloworld.rpgle then it would be compiled as an ILE module.

rules dot mk

If you have got this far... then you are ready for your first compile.

Let's do it in the next video lesson!

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>