Previous Topic: Automation Routines

Next Topic: Writing Automation REXX Programs


Reply to an AS/400 Inquiry Message

The REXX program AS400MRP.cmd facilitates automatic replies to inquiry messages on the AS/400 operator queue. AS400MRP.cmd compares 75 characters of the alert message text to the inquiries on the operator queue. If the comparison criteria are met, it gives the response you specified to the most current message.

Use the following format to call AS400MRP from a rule:

AS400MRP sysname reply &MSG

sysname

The AS/400 system name.

reply

The text of the reply to the message.

&MSG

Passes the message text to AS400MRP.

Example 1:

The following example shows how to call AS400MRP from a CA Automation Point rule:

MSGID(CPA5305), WHEN(&JOBNAME EQ S44A0060),
 REXX(AS400MRP &JOBNAME I &MSG)

For message CPA5305, an automatic response of I (ignore) is issued to the inquiry message in the operator message queue on AS/400 system S44A0060.

Example 2:

The following example shows how to automatically reply to this message:

CPA3394 Load form type 'x' device LASP01 writer Y.   (H C G I R)

To supply an automatic reply of an I (ignore) to message CPA3394, specify a rule similar to this example:

MSGID(CPA3394), WHEN(&JOBNAME EQ S44A0060 AND &WORD7 EQ LASP01),
 REXX(AS400MRP &JOBNAME I &MSG),
 WTO(AP HAS RESPONDED I TO MSG CPA3394 ON SYSTEM &JOBNAME)

Example 3:

The following rule starts the REXX program AS400VRY.cmd with the AS/400 system name and workstation name supplied as parameters. The workstation name is contained in the eighth word (&WORD8 in the alert text).

MSGID(CPF1397), WHEN(&JOBNAME EQ S44A0060 AND &WORD8 EQ PC202S1),
 REXX(AS400VRY &JOBNAME &WORD8)

Note: The REXX program AS400VRY.cmd is coded to be general for multiple AS/400 systems. It receives the AS/400 system name and workstation to be varied on as parameters.

Example 4: Check Job Status

The following example REXX program verifies (every weekday at 16:00) that the job BACKUP1 has been submitted to the batch input queue:

*
* At 16:00 every Monday to Friday, check if job
* BACKUP1 is submitted
* to the batch input queue
*
TIME(16:00),
WHEN(&DAY(1:1) NE 'S' AND (&AS400_AS400AUT_ST_1 EQ 'ACTIVE' OR &AS400_AS400AUT_ST_1 EQ 'RSTART')),
  REXX(AS400CKJ S44A0060)

This rule starts the REXX program AS400CKJ.cmd, with the AS/400 system name (S44A0060) supplied as an argument.

Note: The REXX program AS400CKJ is coded to be general for multiple AS/400 systems. It receives the AS/400 system name as a parameter.