Using the Command Sets Page

Use the Command Sets page to define the commands used to create a particular kind of object on the IBM® i system.

There are two kinds of command sets: general and conditional. General command sets are used to perform tasks that need to be run each build. These work well for set up, establishing overrides for compiles, packaging, and cleanup. Conditional command sets can be run or not based on the state of the output of the builder that is using it. That is, the commands in a command set could be run if the output object of a builder exists but is out-of-date, or if the output object does not exist at all.

Commands in a command set are grouped into processing sections. General command sets can have only one processing section. Conditional command sets have two sections one of which runs if an output object exists but is out-of-date and the other of which runs if the output object does not exist at all. A good example of where this might be necessary is if you want to create a physical file using CRTPF if it does not exist, and change it using CHGPF if it does exist. Data areas and other objects that hold data might need similar special processing. If there is no need to have the sections be different you can set the "does not exist" section to run the same commands as the "exists, but is out-of-date" section.

The layout of the command sets page is similar to that of the other pages. On the left side of the page is a tree that shows the command sets defined in this build specification. You can add, edit, remove, or duplicate a command set. You can also edit, add, or remove the individual commands that are in each section.

To add a command to a section, select the section and click the New... button. A new command will be added and selected. You can then fill in the entry fields:
Name
The Name field is what shows up in the tree on the left side of the page.
Description
You can use the description field to specify a purpose for this command. Descriptions are displayed in the Builders page of the editor, but have no influence on the actual build process.

Beneath the description will be either one or two processing sections in which you can enter the individual commands. General command sets have only one processing section. Conditional command sets have two. You can specify substitution variables in the commands to be supplied by the builder in which this command set will be used. There are special substitution variables that are filled in if this command set applies to more than one resource in the builder. See the section on Variables for information on this.

You can also use this page to reference a command set from another project. First, create a project reference to that project on the Overview page, then on this page, click the Add External... button to add the command sets you want to use from that project. The build specification saves a reference to that command set, so if that command set if ever changed this project will pick up those changes. In this way you can define common command sets that many projects can use.

Please refer to Jazz™.net for more information.


Feedback