VSCode for IBM i and BOB now have creation parameters as variables!

Compile Time Variables make life easier.

Yes - you heard it right. We can define a variable in our Rules.MK File and reference that anywhere in our project. Let's look at an example...

My Power System runs IBM i V7R5M0 but I want to create my code using V7R4M0. This new feature let me easily my global target compile release to *PRV using a global variable.

Simply edit your Rules.mk file in your project root folder. Here is an example where I am adding the TGTRLS parameter as a variable called PROJECT_TGTRLS

Root Rules.MK

PROJECT_TGTRLS := *PRV
SUBDIRS = core database service commands
Compile Time Variables make life easier.

Now this is defined we can reference this variable anywhere else in our project workspace. This example I am using the variable PROJECT_TGTRLS to set the TGTRLS to *PRV for this module:

@SRV3RD.MODULE: @SRV3RD-Third_Party_Interface_Procedures.sqlrpgle @SRV3RDPNL.FILE @SRV3RDINP.FILE @SRV3RDOUT.FILE

@SRV3RDAUD.FILE@SRV3RD.MODULE: private TGTRLS := $(PROJECT_TGTRLS)@SRVEGGS.MODULE: @SRVEGGS-Retrieve_egg_details_from_egg_fil

And I can use the same technique for the *SRVPGM like this:

Compile Time Variables make life easier with TGTRLS
VSCode for IBM i and BOB now have creation parameters as variables! 1
{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>