Alternate method for defining the DIsk DMSAR task in SSMv2
search cancel

Alternate method for defining the DIsk DMSAR task in SSMv2

book

Article ID: 249907

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

After defining DMSAR in SSM, I issued the command P DMSAR and OPS/MVS changed the status on the Resource Status screen to down but didn't issue the command to stop it.  I issued the command S DMSAR and OPS/MVS changed the status on the Resource Status screen to up and issued the correct command to start it.  I issued the command S DMSAR,DMSAR=REMOVE and OPS/MVS intercepted it and issued the command S DMSAR,DMSAR=INSTALL and changed the status on the Resource Status screen to up. How can we correct this?

 

Environment

OPS/MVS

Cause

DMSAR uses a START command to remove (STOP) the hook: S DMSAR,DMSAR=REMOVE

Resolution

An alternate method of defining the Disk DMSAR "hook" task is described below. This assumes the DMSAR task is named "DMSAR". If the task name for DMSAR is different, then it should be substituted for "DMSAR" in the following example.

1. Define the DMSAR task to SSM as type DMSAR.

2. Add the following code to the SSMSTART rule in the blank section immediately following this header:

/*--------------------------------------------------------------------*/
/*---------- Insert any needed site specific logic here --------------*/
/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7*/
If jobstc = 'DMSAR' then do                        
  If POS('REMOVE',cmd.text) > 0 then do            
   address SQL                                     
   "Update "stctbl" set DESIRED_STATE = 'DOWN'",   
    "where JOBNAME = :jobstc OR NAME = :jobstc"    
   RETURN ACCEPT                                   
  End                                              
End            

3. In the Action Table, set the following actions for the DMSAR task:

State change DOWN UP action: START DMSAR,DMSAR=INSTALL

State change UP DOWN action: START DMSAR,DMSAR=REMOVE

 

The SSMSTART rule will now set the correct desired state when the start command includes the word "REMOVE", and the ACTION table will issue the correct command in accordance with the requested state change.