Wednesday, February 5, 2020

REXX: How to execute IMS region commands?

I have the requirement to restart the IMS region by issuing command

/STO REG <region no>

and then

/STA REG <Region Name>

How to achieve this in REXX?


Solution:

ADDRESS LINK  'CSLULXSB'                           
ADDRESS IMSSPOC                                   
"DIS SUBSYS ALL"                                   
"IMS <IMSPlex>"                     
"ROUTE <IMSPlex member>"                     
"CART DISTRAN"                                     
"/STOP REGION "REGION_NO                           
STOP_RC = CSLULGTS('STOINFO.','DISTRAN',"59")     
DO J=1 TO STOINFO.0                               
   Say STOINFO.J                                   
END                         


<IMSPlex> - Your system programmer would know it.
<IMSPlex member> - The region where your command would be executed.

Very important: You need to add your steplib for this REXX to work.

"STEPLIB ADD DA('SYSC.IMSDBCN.SDFSRESL.<IMSPlex member>') NOMSG"                    

In this library, you will find the member CSLULXSB. This is to ensure that you are adding the correct library.

Featured Post

REXX Skeleton: Submitting jobs through Rexx

Submitting jobs through REXX and reading the spool through REXX gives us immense potential to automate many manual activities in mainframes....