In Visual Studio Code for IBM i creating vanilla programs is easy. But what do we do when we want to modify or tailor the create command for individual programs, commands or modules?
We use "private" syntax
In the Rules.mk file, directly after the create statement we want to modify, we add the same object name and list the additional parameters that we want to change with a private statement.
Example 1 - CRTSRVPGM
Here is an example of creating a service program and adding the OPTION(*DUPPROC *DUPVAR) to the CRTSRVPGM command:
These two lines are saying:
Create a SRVPGM (using CRTSRVPGM) and get the export list of procedures from @SRVCMD-Core_Command_Services.bnd and bind the module @SRVCMD.MODULE
Add the optional parameter OPTION(*DUPPROC *DUPVAR) to the CRTSRVPGM command
Example 2 - CRTCMD
Here is an example where I am adding ALLOW(*BPGM *IPGM) to a specific CRTCMD that I want to only run in Batch and Interactive programs: