Using Registers

Registers are general-purpose buffers that steps can use for storing persistent data. Ordinary registers can have single-letter names, or multi-character names that begin with letters.

The case-sensitivity of your underlying database determines the cases you can use when you create register names.

You can include register variables in notification templates; use the ${X} braced form when referencing registers in notification templates. Referencing an empty register returns an empty string.

Use the .push and .pop dot commands to store information in and retrieve it from registers. See also the .poptag command (.poptag), which makes the current job tag equal the contents of a register.

Note: You cannot use registers in commands like variables. You must first pop the value of a register to a file before you can use it.

Table 1. Special registers

Register

Contains

!

Contains the command output lines that matched Fail filter patterns.

Note: This register is visible only in the scope of the step in which the filter is applied. After Rational Build Forge processes the step with the filter, the contents of the register that were potentially set by that step filter are no longer visible.

@

Contains the command output lines that matched Pass filter patterns.

Note: This register is visible only in the scope of the step in which the filter is applied. After Rational Build Forge processes the step with the filter, the contents of the register that were potentially set by that step filter are no longer visible.

=

Specifies the notes database for a job. Allows steps to add data from a file as a note to a job. This register is different from the others:

  • You can only write (push) to this register; you cannot read from it.
  • Data pushed to this register is always appended to it, rather than overwriting previous data.
  • The system supplies a time stamp and user ID with the appended data. This preserves an audit trail of job notes.

Feedback