Project file (.warproj / .warpcfg)
See also the guide: Project.
.warproj — @Project
| Key | Description |
|---|---|
Name | Project name. |
Description | Project description. |
Version | Project version (free-form string, e.g. 1.0). |
Default Profile | Name of the @Profile (defined in the .warpcfg, see below) used by generate/build/reverse/license-status when the CLI doesn’t receive --profile. Optional if the .warpcfg declares only one @Profile. |
@Generator (nested inside @Project)
| Key | Description |
|---|---|
Name | Generator name. |
Description | Generator description. |
Language | Target language. Values: RPGLE, RPG. |
@Paths (nested inside @Generator)
| Key | Description |
|---|---|
Config | Path to this project’s .warpcfg. |
Output | Folder where the generated DDS/RPG is written. |
.warpcfg — @GeneratorConfig
| Key | Description | Values |
|---|---|---|
Date Format | Native date format used to declare every Date variable (e.g. date(*dmy/) instead of plain date). | ISO, USA, EUR, JIS, MDY, DMY, YMD, JUL |
Date Separator | Date separator character (e.g. / in date(*dmy/)). A single character. | — |
Time Format | Native time format used to declare every Time variable (e.g. time(*hms:) instead of plain time), and default for IsTime/StringToTime/TimeToString when their format argument is omitted. Usa is 12-hour with an AM/PM suffix, no seconds — structurally different from the other 4 (24-hour hh:mm:ss). | Hms, Iso, Usa, Eur, Jis |
Time Separator | Time separator character (e.g. : in time(*hms:), also used by TIME()). A single character. Doesn’t apply to Usa (no separator between fields). | — |
Timestamp Format | Default for IsTimestamp/StringToTimestamp/TimestampToString when their format argument is omitted. The timestamp type doesn’t accept a format in its declaration, unlike date/time. Iso is recommended for its broader compatibility. | Iso, Usa, Eur, Jis |
Print Mode | What happens to the QPRINT spool file each Print("Block") writes to: with Screen the program displays it (DSPSPLF) and deletes it on exit; Printer/File just leave it spooled. Default Printer. | Printer, File, Screen |
Commitment | Enables commitment control for the whole project: generated programs and screens (Program and Screen) declare their modified tables commit usropn and open them after a best-effort STRCMTCTL (tables must be journaled). A Program or Screen can override it with @Properties/Commitment. Default False. | True, False |
Commit on Exit | Whether generated programs and screens issue a final commit before finishing. Overridable via @Properties/Commit on Exit. Only effective if Commitment is True. Default False. | True, False |
DDS Name | Pattern for naming each Screen’s display file DDS based on its object name — e.g. <ObjectName>D appends a D. Default <ObjectName> (unchanged). Only affects the DSPF; the generated RPG driver program keeps the object name as-is. The result is always uppercased and truncated to 10 characters (OS/400 object name limit) — the variants that append D truncate to 9 first so the D is never what gets truncated. | <ObjectName>, <ObjectName>D, D<ObjectName>, D<ObjectNameWithoutFirstChar> |
Top-level keys (Date Format, Print Mode, Commitment, etc.), @Screen/@FunctionKeys, and the date/time/timestamp formats are unique at the project level: they aren’t repeated per profile.
@Profile (nested inside @GeneratorConfig)
A .warpcfg declares one or more deployment profiles (typically Dev, UAT, Prod, though the name is free-form) inside @GeneratorConfig. Each @Profile "Name" groups its own @Connection, @Deployment, and @License — so a single project can point to different servers/libraries/licenses depending on the environment, without maintaining several .warpcfg files.
@GeneratorConfig {
@Profile "Dev" {
@Connection { ... }
@Deployment { ... }
}
@Profile "Prod" {
@Connection { ... }
@Deployment { ... }
@License { ... }
}
}
Declaring at least one @Profile is mandatory: @Connection/@Deployment/@License declared directly inside @GeneratorConfig (without wrapping them in @Profile) are no longer valid (error E00290). A @GeneratorConfig with no @Profile at all gives error E00291.
How the active profile is chosen for generate/build/reverse/license-status (the validate action ignores profiles):
- The CLI’s
--profile <Name>flag, case-insensitive. - If omitted,
Default Profilefrom@Project(see the.warproj — @Projectsection above). - If there’s no
Default Profileeither but the.warpcfgonly declares one@Profile, that one is used. - If none of the above applies and there are several profiles declared, the compiler fails with error
E00293, listing the available profiles.
Requesting a profile that doesn’t exist (via --profile or Default Profile) fails with error E00292, also listing the available profiles.
@Screen (nested inside @GeneratorConfig)
| Key | Description |
|---|---|
Rows | Number of screen rows. Numeric, default 24. Only the two 5250 sizes 24x80 and 27x132 are accepted (E00348 otherwise). It is a project setting: it cannot be changed per screen. |
Columns | Number of screen columns. Numeric, default 80 (132 with Rows : 27). |
Function Keys Row | Row where the function-key line is drawn (FunctionKeysRow is also accepted). Valid range: 1 to Rows - 1 (the last row is kept for messages); out of range gives E00346. If omitted, Rows - 1 is used (23 in 24x80; in a popup, the window’s last row minus one). A Function Keys Row in a Screen’s @Properties takes precedence over this one. |
Function Keys Color | Color of the whole key line (FunctionKeysColor also accepted): Green, White, Red, Blue, Yellow, Pink or Turquoise, the same as Style. An invalid name gives E00347. Without a value the line has no color. A Function Keys Color in a Screen’s @Properties takes precedence over this one, and a key’s color in its Event takes precedence over both. |
The compiler does not warn if the chosen row overlaps the @Layout: whoever moves it must leave that row free. If the keys do not fit in one line and there is no F24 rotation, the second line goes up from the chosen row.
@FunctionKeys (nested inside @Screen)
One F<n> : "Label" entry per line (n from 1 to 24, e.g. F3 : "Exit"). Attached to its own event with Event 'Name' <n> ... EndEvent in a Screen’s @Source.
Key rotation with F24. If F24 is declared here (e.g. F24 : "More keys") and no Event in the file claims it (Event 'X' 24), the Screen’s attention line can rotate. All keys are considered (those in @FunctionKeys plus those of Events with a key). If they fit in one line, there is no rotation and the line is generated as usual. Otherwise they are split into sets ordered by key number, each fitting in a single line and ending with F24=<label>. Pressing F24 shows the next set (after the last one it returns to the first); the keypress only changes the key line and does not run any event. The usable width is the screen width minus 2 columns (the window width in a popup). Without F24 declared, or with an Event on F24, the line shows all keys in one or two lines.
@FunctionKeys {
F3 : "Exit"
F5 : "Refresh"
F24 : "More keys"
}
@Connection (nested inside @Profile)
How to reach the IBM i:
| Key | Description | Values |
|---|---|---|
Host | Hostname or IP of the IBM i. Required. | — |
User | User profile to connect with. Required. | — |
Auth Method | How to authenticate. Required. password reads the password from the WARPGATE_PASSWORD environment variable; interactive, when run from the VSCode extension, prompts for it with a dialog box on every Build & Deploy and every Reverse Engineer DDS (running the raw binary from a terminal, it behaves the same as password). | key, password, interactive |
Key File | Path to the private key file. Required only if Auth Method: key. | — |
Protocol | Transport protocol. Required. ftp can’t be combined with Auth Method: key. | ssh, sftp, ftp |
Port | TCP port. Numeric, default 22. | — |
Timeout | Connection timeout in seconds. Numeric (-128 to 127), default 30. | — |
ssh/sftp/ftp use native clients: there’s no need to have any ssh/scp/sftp/ftp client installed on the machine running the compiler.
Examples by protocol and authentication method
SSH or SFTP with a key (ssh/sftp are equivalent: the native client uses the same transport for both):
@Connection {
Host : MYHOST
User : MYUSER
Auth Method : key
Key File : ~/.ssh/id_ed25519_ibmi
Protocol : ssh
Port : 22
Timeout : 30
}
SSH or SFTP with a password — the password isn’t written into the .warpcfg; it’s read from the WARPGATE_PASSWORD environment variable, which must exist before opening VSCode (or the terminal the compiler runs from):
@Connection {
Host : MYHOST
User : MYUSER
Auth Method : password
Protocol : sftp
Port : 22
Timeout : 30
}
FTP with a password — FTP has no concept of key-based authentication (Auth Method: key with Protocol: ftp is a validation error), so it only accepts password/interactive, both read from the same WARPGATE_PASSWORD variable:
@Connection {
Host : MYHOST
User : MYUSER
Auth Method : password
Protocol : ftp
Port : 21
Timeout : 30
}
Generating the Key File
Auth Method: key needs an SSH key pair: a private one (the one Key File points to) and a public one, which must be authorized on the IBM i user profile.
- Generate the key pair (on the machine running the compiler/VSCode, not on the IBM i):
This createsssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_ibmi -N ""id_ed25519_ibmi(private — the path that goes inKey File) andid_ed25519_ibmi.pub(public).-N ""leaves the key without a passphrase, a requirement forAuth Method: key. - Copy the contents of
id_ed25519_ibmi.pub(a single line) to the end of the.ssh/authorized_keysfile inside the IBM i user’s IFS home directory (e.g./home/MYUSER/.ssh/authorized_keys) — create the file and directory if they don’t exist. The IBM i’s SSH daemon (SSHD, from product 5733-SC1) must be active and configured to accept key-based authentication. - Verify that
Key Filein@Connectionpoints to the private key’s path on the local machine (not the.pubone), and thatAuth Methodiskey.
@Deployment (nested inside @Profile)
Where/how to deploy and compile on the IBM i:
| Key | Description | Values |
|---|---|---|
CL Source | Name of the generated CL source member (OS/400 object name, max. 10 characters). Required. | — |
Cleanup | Whether the staged source is removed after a successful compile. | true, false |
Target Release | Target OS/400 release for the compile (e.g. V7R4M0). | — |
Optimization | RPG compiler optimization level. It is emitted as OPTIMIZE(...) in the programs’ CRTBNDRPG. If omitted, nothing is emitted. Any other value produces error E00020. | *NONE, *BASIC, *FULL |
Debug | Program debug view. true emits DBGVIEW(*SOURCE); false emits DBGVIEW(*NONE). If omitted, nothing is emitted and the compiler uses its default. | true, false |
Temp Path | IFS staging directory used during deploy. Required. | — |
Data Library | Library where the compiled DDS physical/logical file objects are created (OS/400 object name). Required. | — |
Objects Library | Library holding the DDS/CL source members (QDDSSRC/QCLSRC) and where the compiled CL program object is created (OS/400 object name). Required. | — |
Source Tables | Source member holding the physical/logical DDS source (OS/400 object name). Required. | — |
Source Programs | Source member holding the generated RPGLE/CL. | — |
Compile Library | Comma-separated list of libraries added to the compile job’s library list, in order, instead of just Data Library — for programs whose tables live across several libraries. | — |
@License (nested inside @Profile)
Optional block with the licensing configuration, specific to each profile — so Dev/UAT/Prod can consume different licenses or licensing services. Keys are case-insensitive. See the Licensing guide.
| Key | Description | Values |
|---|---|---|
Host | License service host. With Host the mode is organization and File is ignored; without Host, the mode is individual. | — |
Port | Service TCP port. Default 7443. | 1-65535 |
Fingerprint | SHA-256 fingerprint of the service certificate (accepts : and uppercase). | 64 hex |
SPN | Kerberos service name. Default warpgate-license/<host>. | — |
File | Individual license file. Default ~/.config/warpgate/license.json (%APPDATA%\warpgate\license.json on Windows). | — |
@License {
Host : "servidor01.dominio.local"
Port : 7443
Fingerprint : "3f2a9c41d87b05e6a1c4f0937be2d5688a1f4c0d29e7b3a65c8d1f0e4b7a9c23"
}
Full example
See Project: .warproj and .warpcfg for a complete example with both files.