IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Retrieving IMS message processing regions using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
tneelakandan

New User


Joined: 22 Nov 2019
Posts: 5
Location: Germany

PostPosted: Fri Nov 22, 2019 7:23 pm
Reply with quote

Hi,

Could anyone help in providing the REXX to execute the command

/DIS ACT

which is used to get the IMS Message processing regions.

Thanks
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2214
Location: Silicon Valley

PostPosted: Sat Nov 23, 2019 12:15 pm
Reply with quote

This is the example that I put in the manuals when I worked for IBM:
Code:
Address LINK 'CSLULXSB'                                         
    Address IMSSPOC                                                 
    /*------------------------------------------------------------- 
    | 'ims' defines the IMSplex that receives the commands         |
    |                                                              |
    | 'route' defines which IMSplex members in the IMSplex         |
    | receives the commands.  If ROUTE is not specified or if      |
    | ROUTE * is specified, commands are routed to all IMSplex     |
    | members.                                                     |
    |                                                              |
    | 'wait' provides a timeout value to OM.  The time is in       |
    |  mmm:ss format (or ssss if no colon is specified).           |
    |                                                              |
    | 'cart' establishes the command response token for subsequent |
    | commands.                                                    |
    |                                                              |
    | 'end' frees control blocks                                   |
    |                                                              |
    --------------------------------------------------------------*/
    "IMS  IPLX4"                                                     
    "ROUTE IMS1,IMSB"                                               
                                                                     
    "WAIT  5:00"                                                     
                                                                     
    "CART DISTRAN"                                                   
    "/DIS TRAN PART"                                                 
                                                                     
    /*-------------------------------------------------------------                       
     | The cslulgts function retrieves data associated with a       | 
     | a specific token and fills in a REXX stem variable.  In      | 
     | this example, it waits 59 seconds.                           | 
     |                                                              | 
     | The XML statements returned are put in the stem variable     | 
     | specified by the user.                                       | 
     |                                                              | 
     --------------------------------------------------------------*/ 
     spoc_rc = cslulgts('DISINFO.','DISTRAN',"59")                     
     do z1 = 1 to  DISINFO.0                                           
       /* display each line of XML information */                     
       Say disinfo.z1                                                 
     end                                                               
     "END"

That assumes that you have set up the Common Service Layer, have permissions, etc...

See the Common Service Layer manual
Back to top
View user's profile Send private message
tneelakandan

New User


Joined: 22 Nov 2019
Posts: 5
Location: Germany

PostPosted: Sat Nov 23, 2019 2:53 pm
Reply with quote

Hi Pedra,

Thanks! I was referring to the same REXX from the manuals..

Glad to know and discussing with the owner of this.

I had two challenges but I had overcome it.

i. Knowing the IMSPlex name.

I didn't know how to find the IMSPlex name. I had to contact a person from operation team to find this information.

Is there a way to find the IMSPlex name?

ii. Executing the REXX in a system where the IMS system is not installed.

We have 3 systems running, I am running my REXX in TSO session in System 1 but the IMS is installed in System 3. So, my REXX was not working from TSO session in System 1. But if I login to TSO session in System 3, then the same REXX is working.

My question is, is there a possibility to run the REXX from TSO Session in System 1 itself?

Is there a equivalent in REXX to that of JCL syntax /*JOBPARM SYSAFF=?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2448
Location: Hampshire, UK

PostPosted: Sat Nov 23, 2019 3:57 pm
Reply with quote

Why not run it in batch on that system?
Back to top
View user's profile Send private message
tneelakandan

New User


Joined: 22 Nov 2019
Posts: 5
Location: Germany

PostPosted: Mon Nov 25, 2019 5:15 pm
Reply with quote

Hi,

It is possible. But I want to know how to make it possible in REXX if at all it is possible.
Back to top
View user's profile Send private message
tneelakandan

New User


Joined: 22 Nov 2019
Posts: 5
Location: Germany

PostPosted: Mon Nov 25, 2019 8:46 pm
Reply with quote

Also, I want to read the region number and issue stop region command.

DO Z1 = 1 TO DISINFO.0
REGION_NAME = SUBSTR(DISINFO.Z1,16,8)
REGION_NO = SUBSTR(DISINFO.Z1,13,2)
IF REGION_NAME = "The region I want to restart" THEN
DO
"/STO REG "REGION_NO""
END
END

Does it work as it is? Or Should there something more to be done to execute the STOP REGION command?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2448
Location: Hampshire, UK

PostPosted: Tue Nov 26, 2019 3:01 am
Reply with quote

Run your rexx program as a batch job on that other system!!!!!!!!!!!!!!!!!!!!!!!!!!
Back to top
View user's profile Send private message
tneelakandan

New User


Joined: 22 Nov 2019
Posts: 5
Location: Germany

PostPosted: Wed Nov 27, 2019 5:25 pm
Reply with quote

OK.

How shall I execute this command in REXX?

"/STO REG "REGION_NO""
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Any examples of calling FTP from REXX? CLIST & REXX 1
No new posts SummeRx: a new framework for REXX z/OS CLIST & REXX 6
No new posts A command to change LRECL of an exist... JCL & VSAM 7
No new posts Using REXX to access SDSF; What am I ... CLIST & REXX 38
No new posts Calling Assembler from REXX PL/I & Assembler 5
Search our Forums:

Back to Top