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.
- Create a report.
- Select the default form.
- Select Form--> Edit.
- Click the Columns tab.
- Click on a row.
- Click Add.
The Column dialog box opens.
- Type the name for the new column in the Heading field.
- 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.
- Type the ObjectREXX expression in the Definition field.
- 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.
- Conditions define the situations under
which an action will occur, such as printing a message.
- Detail variations specify the action
that will occur when the condition is met.
A set of simple conditions is presented below:
- Select a default form.
- Select Form--> Edit.
- Click the Conditions tab and define the
conditions, such as:
&7/&6>.03
&7/&6<.03
- Click the Details tab.
- Select Yes from the Enable drop-down
list.
- Check the Include column headings with detail headings check
box.
- Type the number of blank lines in the Blank lines after block field.
- Type the text for the detail block in the Detail Block Text field.
- Click 2 of 2.
- Select Yes from the Enable drop-down
list.
- Check the Include column headings with detail headings check
box.
- Type the number of blank lines in the Blank lines after block field.
- Type the text for the detail block in the Detail Block Text field.
