The editor cannot compile the source code by itself but supports starting a compilation of the source code on the server.

Start Compilation

The compilation can be started via the menu entry in the main menu

    Main Menu ⇒ Source ⇒ Compile

or with the keyboard shortcut (key binding)

    CTRL + SHIFT + C

From the Remote Explorer the compilation can also be started via the context menu (right click) of a source member.

The currently open source member in the active editor or the selected source member in the Remote Explorer will be compiled whereas the source member in the active editor takes precedence over the selection in the Remote Explorer.

Compile Command

The compile command used for compilation can be set via the context menu of the source member in the Remote Explorer.

    Set Compile Command

The IBM i command used for compilation can be set in the preferences.

    Main Menu ⇒ Window ⇒ Preferences ⇒ Compile ⇒ Commands

Compile Options

The parameter/options for the compile command can be set globally and for each member separately.

A static text can be passed as compile options but the editor also supports placeholders/variables. These placeholders have the following syntax:

    ${placeholder}
The compile option OPTION(*EVENTF) is needed for retrieving the compile result from the server.

Member Description Properties

Properties from the member description can be used as placeholders in the compile options.

Example:

    SRCFILE(*LIBL/${fileName}) SRCMBR(${name}) PGM(${name}) OPTION(*EVENTF)
  • changeDate
  • creationDate
  • lastUsedDate
  • fileName
  • library
  • name
  • textDescription
  • daysUsed
  • restoreDate
  • saveDate
  • attribute

Java System Properties

Java system properties can also be used as placeholders. For adding a Java system properties to MiWorkplace the miworkplace.ini file needs to be edited. See Eclipse Start Parameters, section VM Args.

Environment Variables

Environment variables can also be used as placeholders.

Display Compile Command

The command with the resolved compile options and parameter can be viewed via the context menu of a source member in the Remote Explorer.

    Display Compile Command

Compile Result

The result of a compilation will be automatically fetched from the server and displayed in the Compile Result view.

The result of a compilation is cached so that the results of the different source members can be viewed without loosing any other compile results.

The Compile Result view supports going to the line in the editor by double clicking the line in the result table.