When expressions are evaluated by REXX

Expressions specified on the FORM.CALC panel and used as substitution variables (&CALCid) in text areas of the form are passed to REXX for evaluation at the certain times, depending on where they are placed in the form.

  • Calculations are processed when they are formatted:
    • References on FORM.DETAIL panels with the Select Panel Variation field set to NO or to Cn (where the n condition is false) are not evaluated.
    • If the calculation is listed on separate lines in one variation, it might be evaluated multiple times.
    • If the calculation is referenced on several selected FORM.DETAIL variations (in which the Select Panel Variation field is YES or Cn, where condition n is true), the calculation might be evaluated multiple times.
  • Expressions specified on the FORM.CALC panel and used as usage codes on the FORM.COLUMNS panel are evaluated by REXX whenever the value is needed for formatting.
  • Expressions specified on the FORM.COLUMNS Definition panel to define a new column are evaluated by REXX each time a row is fetched from the database. Rows can be fetched more than once (for example, to support printing a report in which page-splitting is required or to support a usage code, such as TCPCT, which requires all the data to be retrieved first).
  • Expressions specified on the FORM.CONDITIONS panel and referred to on a FORM.DETAIL panel variation are evaluated by REXX at least once for every detail row formatted in a report.