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:
/* Date Created: 11/11/12 */ /* Purpose : Configure initiators to handle batch window */
JOB=MSG.JOBNAME /* set JOB to issuer of msg */ if JOB = 'MYJOBA' then RETURN 'SUPPRESS' else return 'DELETE'
/* Obtain the abend code from this message and put in ABEND var */ parse var MSG.TEXT . 'ABEND=' ABEND .
/* Obtain the first 3 characters of the job name in this message */
JOBN = WORD(MSG.TEXT,2) /* job is 2nd blank delimited word */
/* in this msg */
MASK = SUBSTR(JOBN,1,3) /* get the job name mask */
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.
|
Copyright © 2011 CA.
All rights reserved.
|
|