Creating an IBM i Command build definition

This topic describes how to create and configure an IBM® i Command Build Definition.

Before you begin

You must be connected to a project area and logged in as a user with Save Build Definition permission. If you plan to use the IBM i Jazz™ Source Control pre-build participant to load workspace artifacts to the library file system, you must also have a dedicated build workspace in which i Projects are mapped to IBM i libraries. For more information see, Dedicated build workspaces. For more information about mapping i Projects, see Synchronizing a repository workspace with mapped libraries on IBM i.


  1. In the Team Artifacts view, expand your Project Area
  2. Right-click Builds; then click New Build Definition.
  3. In the New Build Definition wizard, on the New Build Definition page, use the Browse button to select a team area, and then click Next.
  4. On the General Information page, in the Available build templates pane, select IBM i Command - Jazz Build Engine and click Next.
  5. Optional: If you use Jazz Source Control, on the Pre-build page, select IBM i Jazz Source Control and click Next.
  6. On the Additional Configuration page, ensure that all options are selected and click Finish.
  7. In the Build Definition editor, click the Command - IBM i tab.
  8. In the Build command field, type the command that builds your project (for example, CRTBNDRPG or CALL PGM(MLBUILD/BUILD)).
  9. To run the build command iteratively, select Run the build command for every changed artifact or Run the build command for all artifacts in the workspace. You can use substitution variables as parameters to the build command to identify the properties of each artifact. See the F1 help for the IBM i Command panel for details on using this and other fields in the panel.
  10. Optional: In the Pre-build command and Post-build command fields, type any commands necessary to set up or tear down the build environment. For example, you can call a program to set up file overrides or to compile the source for a build program that has been loaded from the Jazz Team Server repository to a source file member. The Pre-build command is executed after the files are loaded to the libraries. The Post-build command is executed after the build command completes.
  11. Optional: Specify a current library in the Current library field. The order of the libraries in the Library list table will determine the order of the library list in the build engine's job.
  12. Optional: Select the Clear libraries before loading option to execute the CLRLIB command. The CLRLIB command will clear each of the mapped libraries in the repository workspace properties before i Projects artifacts in the repository workspace (for example, source physical files, source members, and save files) are loaded to those mapped libraries.
  13. Optional: To schedule builds, complete the following steps:
    1. Click the Schedule tab.
    2. To enable build scheduling, under Schedule, select Enable.
    3. In the Build Time pane, specify either continuous build intervals in minutes, or a specific build time.
    4. In the Build Days pane, select the days of the week that the build runs.
  14. Optional: If you selected IBM i Jazz Source Control, complete the following steps:
    1. Click the Jazz Source Control - IBM i tab.
    2. Click Select to find the dedicated build workspace you created for building your native program.
    3. In the Load and Accept options panel, choose Load latest changes only to only load those artifacts that are accepted into the build workspace when the build runs. Or, choose Load all workspace contents to load all workspace artifacts every time the build runs.
  15. Click Save.

What to do next

Keep the following in mind when using the IBM i Command build template:
  • Personal builds are not allowed when requesting an IBM i Command build. Use the Rational® Developer for i project build facility for personal builds.
  • If you are using Load latest changes only and change one or more library mappings for the build workspace, use the Compare with IBM i view or change temporarily to Load all workspace contents to do a full load of all files to the library file system.
  • If you are using Load latest changes only and your build fails (for example, because a source file is locked on your host), you may need to use the Compare with IBM i view or change temporarily to Load all workspace contents to make certain that all of the latest repository changes have been reflected on the host. If you are already using Load all workspace contents, the changes will get loaded (along with the rest of the repository artifacts) next time the build runs.
  • A dedicated build workspace is essential when using the Load latest changes only option. If changes are accepted before the build runs, they will never be loaded to the library file system.
  • There is a difference between what is considered changed by the IBM i Jazz Source Control pre-build participant versus the IBM i Command build. The former is determined by what is currently being accepted into the build workspace; the latter is determined by comparing the current build snapshot with the previous successful snapshot.

video icon Video channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community forums library

support icon Support

IBM Support Community
Deployment wiki