How to stop a resource and its dependent resources from REXX?
search cancel

How to stop a resource and its dependent resources from REXX?

book

Article ID: 282091

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

How to stop a resource and its dependent resources from a REXX program or rule?
In other words, how to execute the same function given by the "W" command in the OPSVIEW panel 4.11.2?

W   - Stop the selected resource and all its dependent resources by changing
      their desired states to the DOWN state                                

Resolution

The STATESET REXX we deliver can be used for this purpose.


If calling STATESET from an AOF rule we recommend the following syntax:

RESOURCE = 'TASK1'        <--- resource to be stopped            
ADDRESS OSF                                                   
"OI P(STATESET) ARG('"RESOURCE" DESIRED(DOWN) SUBREQ(DOWN)')" 

The parameter SUBREQ(DOWN) causes the dependent resources to be stopped.

If calling STATESET from a REXX program running on an OSF server the following syntax can be used:

resource = 'TASK1'     
call STATESET resource "DESIRED(DOWN) SUBREQ(DOWN)"