Examples
The following are examples of REXX comparison expressions:
- Example 1
- Select records in which the transaction date (field #14) is any
date in July 2000, or the transaction value (field #27) is greater
than $100,000.00
(#14 >= 20000701 & #14 < 20000801) | #27 > 100000.00
- Example 2
- Select records in which the count of credit notes (field #62)
is greater than 10% of the count of invoices (field #61)
#62 > #61/10
- Example 3
- Select records in which either the transaction value (field #27)
is greater than $50,000.00 and the purchase order number (field #25)
starts with characters other than 'TX', or the transaction value is
greater than $70,000 and the supplier number (field #23) is 984545,
but not if both sets of conditions are true
(#27 > 50000.00 & SUBSTR(#25,1,2) ¬= 'TX') && (#27 > 70000.00 & #23 = 984545)