In this example, we ensure that all the datasets of the Payment Department jobs have a HLQ of PAYDY. After the test, the process calls the TEST1 user exit, with the arguments, ARG1, ARG2, and ARG3.
Fig.JV.3.27 DO REXX example
 +-----------------------------------------------------------------------------+
 | RULE      DAILYPAY   ENVIRONMENT PROD       PRIORITY 3 CONTINUE SEARCH Y    |
 | DESC       Checks files of payable jobs                                     |
 |=============================================================================|
 | JOBNAME PAY*____            _                                               |
 | LIBRARY  PRD.PAY.ACCOUNT.DAILY.JOBS__________________  MEMBER  DPAY*___     |
 | SCHDLIB                                              SCHDTAB          O/N   |
 |=============================================================================|
 | ON DD       *        DSN *                                                  |
 |    DISP                     UNIT            VOL                             |
 |    SMS CLASS DATA           STORAGE          MANAGEMENT               O/N   |
 |=============================================================================|
 | IF %%$SUBSTR %%$DDDSN 1 6 NE 'PAYDY.'                                       |
 | DO MSG  TYPE E Invalid HLQ for payable system files.                        |
 | ENDIF                                                                       |
 | DO REXX MEM TEST1 LIB SYS2.CLIST                                            |
 | PARM ARG1 ARG2 ARG3                                                         |
 |=============================================================================|
Parent Topic |