ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Enquiry for a function to delay action

book

Article ID: 226891

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

We have enabled a message rule to trigger a reply. But we need a delay of 2mins before the reply.

Once the message appears, the action taken by the message rule should be delayed by 2 mins.

Do we have any OPS/ MVS REXX function for this?

Environment

Release : 13.5 14.0

Component : OPS/MVS

Resolution

One possible solution is to enable a dynamic TOD rule to issue the actual reply. 
Here is a sample rule that captures a message IEAXXX, creates a dynamic TOD rule to be executed after 2 minutes and reply "U" to the original WTOR:

)MSG IEAXXX                                                         
)PROC                                                               
JOBNAME = MSG.JOBNAME                                               
MSGID   = MSG.ID                                                    
QUEUE ")TOD *+2 MINS"                                             
  QUEUE ")PROC"                                                     
  QUEUE "ADDRESS  TSO"                                              
QUEUE "'OPSREPLY JOBNAME("JOBNAME") MSGID("MSGID") TEXT(''U'')'" 
  ADDRESS AOF                                                       
  "ENABLE *DYNAMIC."MSGID                                           
RETURN