DB2 graphic QMF Version 8

Complex ObjectREXX calculations

To use complex ObjectREXX calculations, you need to write a full program in ObjectREXX and call it from the CALC. For example, a complex ObjectREXX program could divide two values, compare the result to another value and place a comment or value in the report based on the comparison.

The following is an example of CALC syntax for a complex ObjectREXX calculation:

PROG(&6,&7,.03)

where PROG is the REXX program.

Column definitions

ObjectREXX offers a column definition function, by which new columns can be created interactively in the original query.

  1. Create a report.
  2. Select the default form.
  3. Select Form--> Edit.
  4. Click the Columns tab.
  5. Click on a row.
  6. Click Add.

    The Column dialog box opens.

  7. Type the name for the new column in the Heading field.
  8. Optional: Provide additional information about the column in the Usage code, Edit code, Indent, Width, Heading Alignment, Sequence, and Data alignment fields.
    Note:
    You can embed an ObjectREXX function in the Definition field to call an ObjectREXX program.
  9. Type the ObjectREXX expression in the Definition field.
  10. Optional: Check the Pass nulls check box to pass the definition to ObjectREXX for evaluation when a variable in the definition has a null value.

Conditions and detail variations

Conditions and detail variations can be incorporated into an ObjectREXX program.

A set of simple conditions is presented below:

  1. Select a default form.
  2. Select Form--> Edit.
  3. Click the Conditions tab and define the conditions, such as:
    &7/&6>.03
    &7/&6<.03
  4. Click the Details tab.
  5. Select Yes from the Enable drop-down list.
  6. Check the Include column headings with detail headings check box.
  7. Type the number of blank lines in the Blank lines after block field.
  8. Type the text for the detail block in the Detail Block Text field.
  9. Click 2 of 2.
  10. Select Yes from the Enable drop-down list.
  11. Check the Include column headings with detail headings check box.
  12. Type the number of blank lines in the Blank lines after block field.
  13. Type the text for the detail block in the Detail Block Text field.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004