Previous Topic: Event-related Variables

Next Topic: OPS/REXX Host Environments and Built-in Functions

REXX Programming Techniques

Logic commonly implemented in all AOF rules is to manipulate and process data. Standard REXX programming tools can be used in AOF rules to perform this type of logic, such as making decisions about an AOF event or further breaking down AOF event data.

REXX instructions, such as the IF..THEN..ELSE statement or the SELECT..WHEN..OTHERWISE statement, let you make decisions about data in an AOF rule, while the PARSE instruction-or perhaps a REXX function such as WORD(), SUBSTR(), or POS()-lets you further interrogate AOF event data.

Examples: REXX Programming Techniques

The following examples demonstrate standard REXX programming used in AOF rules:

For more detailed information about standard REXX, see any REXX reference guide. An excellent reference is the second edition of THE REXX LANGUAGE: A Practical Approach to Programming by M.F. Cowlishaw, available through Prentice Hall publishers. In addition, the CA OPS/MVS EasyRule facility is a good tool for learning REXX.

Note: OPS/REXX is the underlying programming language used in AOF rules. Standard REXX is a subset of OPS/REXX, so minor operational differences may exist for particular standard REXX techniques that you attempt to use in AOF rules. For information regarding these differences, see the User Guide and Command and Function Reference.