Automated MOVE of a resource at IPL via Solve:Operation
search cancel

Automated MOVE of a resource at IPL via Solve:Operation

book

Article ID: 201582

calendar_today

Updated On:

Products

SOLVE:Operations Automation SOLVE: Access Session Management SOLVE:Access Session Management SOLVE:FTS

Issue/Introduction

An STC resource (STCRES1) is defined on system SYS1 and defined on system SYS2 in the active local image. This resource can be moved from one system to the other one using the mv line command.

Currently, the move of this STC is managed manually. As this resource needs to be active 7x24 on the sysplex, is it possible to automate this move as a part of the SHUTSYS procedure?

In detail - 

STCRES1 -  in automated mode   (SYS1 primary - SYS2 alternate system)

SYS1 shutsys - resource should move to system SYS2 (SYS1 and SYS2 are same sysplex - syncronized db)

SYS1 restart - some event or anything else should be sent to system SYS2 to move back the resource to SYS1

SYS2 shutsys - resource should be moved to SYS1

 

Environment

Release : 11.9

Component : CA SOLVE:Operations Automation for z/OS

Resolution

SHUTSYS processing supports a user exit point of $RMEXSHT.
There you can house the code to automate the moving of the resource.

The code itself could be something as simple as this:

&IF .&ZPRINAME = .SYS1 &THEN + -* is sys1?                       
&DO                                                       
 &#FRSYS = SYS1                                    
 &#FRVER = 0001                                        
 &#TOSYS = SYS2                                      
   &#TOVER = 0001                                         
&DOEND                                                    
&ELSE + -* must be sys2                                                  
&DO                                                       
 &#FRSYS = SYS2                                      
   &#FRVER = 0001                                         
 &#TOSYS = SYS1                                  
 &#TOVER = 0001                                       
&DOEND                                                    
                                                          
&CALL PROC=$RMCALL +                                      
      PARMS=(ACTION=COMMAND,COMMAND=MV,+                  
             SYSNAME=&#FRSYS,VERSION=&#FRVER,+            
           CLASS=02,NAME=STCRES1,+                     
             PARMS="TOSYSNAME=&#TOSYS TOVERSION=&#TOVER + 
                    TOLOCSYS=&#TOSYS TOLOCVER=&#TOVER")   

Substitute your values for the values in RED above - SOLVE ACB Name and the active system images names for SYS1 and SYS2

Whichever system this procedure runs on, it will move the resource to the other system. 

When either SYS1 or SYS2 issues SHUTSYS, this procedure could be executed from $RMEXSHT to move the resource to the other system.  

Now, assuming you have created a procedure called MOVEIT with the code outlined above.

To run it normally from a process you would code:

&CALL PROC=MOVEIT. 

To have it run on another region you would code:

&APPC RPC  PROC=MOVEIT +
                     LUNAME=remote_acbname +
                       RETCODE=#rpcrc 

This is the approach you would use to get the resource back to SYS1 when it comes back up.

You could pick a resource in SYS1 (e.g. JES or VTAM) that  when it becomes ACTIVE (set up a state change exit) have it execute the procedure that uses the APPC RPC to execute MOVEIT remotely.