OPS/MVS

 View Only

 Shutting Down OPSS

Sharon Mirabella's profile image
Sharon Mirabella posted Feb 05, 2025 09:16 AM

Hi,

I've been asked to have OPS/MVS shut itself down after all other tasks have shut down in SSM. I'm curious how other folks do this?

We use the SSMSHUTM rule to monitor the shutdown of the tasks, can I have OPS/MVS shut itself down when the 'upcount = 0' indicating all tasks have been terminated?

Hennie Hermans's profile image
Broadcom Employee Hennie Hermans

Hi Sharon,

To shutdown the system completely there is a sample TOD rule for the System Shutdown.. 
You mentioned you are using the SSMSHUTM, but there is also a SHUTSYS rule in the CCLXRULS dataset of OPS/MVS.

See if this is what you are looking for.

Best regards
Hennie Hermans 
Broadcom

Sharon Mirabella's profile image
Sharon Mirabella

Hi Hennie,

The SHUTSYS rule may be what I'm looking for but this may be a bigger change than I was expecting. The rule indicates its enabled by sample program SHUTSYS2 which I'm not familiar with.

We currently execute exec/program SSMSHUT to shut down our system, looks like I have some homework to do.

Thanks for the information,

Sharon

Marcel van Ek's profile image
Marcel van Ek

Hi Sharon, we added some stuff at the end of SSMSHUTM (something like if count=0 just before disableing itself) to start an OPS/REXX program we call SSMSHUTX.

That rexx takes care of all the rest (depending upon original shutdown request (if you have more than 1) )

  • Limit the number of OSFservers
  • Do the HALT EOD
  • if in a sysplex, Do the VARY XCF,OFF     
  • if in a sysplex, Reply SYSNAME=<sysname> to IXC371D
  • Do STOP OPSS (or whatever subsys is running)

Works like a charm.

Sharon Mirabella's profile image
Sharon Mirabella

Thanks Marcel,

That sounds like an easier way to go, I think I'll try that approach.

Robert Stark's profile image
Robert Stark

We have OPSMVS defined to SSM as the prereq to JES2, RACF, and OMVS, and it stops itself when they are all down.

Our shutdown procedure launches a SUB=MSTR system REXX program, that watches for a list of tasks to be all down. When they are, if issues the HALT EOD, issues the VARY sysname,OFF and replies to it. This way, the system does not crash while OPSMVS is running. 

We launch the system REXX program with this command:

 "F AXR,REIPL,TIMEINT=0,TSO=NO",               
 "WAITFOR(OPSS) XCFCMD(VARY XCF,&SYSNAME,OFF)" 

It can also do VARY XCF,&SYSNAME,OFF,REIPL

That is cool because it goes down and comes back up, using the same load parm.

Sharon Mirabella's profile image
Sharon Mirabella

Hi Robert,

Thanks for your suggestion. I haven't decided which approach I'm going to take yet.

Much appreciated,

Sharon

Dave Gorisek's profile image
Dave Gorisek

Little late to the party but just something else to think about/test if you are still working on this issue - The sample SHUTSYS rule is basically a copy of SSMSHUTM with some additional logic to 1) Create a max IPL window time frame (SSMSHUTM will run forever if some SSM resources fails to end 2) Generate banner status messages of IPL being initiated and how much time left in the allotted IPL window time if you still have folks/operators that initiate and monitor IPL status and 3) Stop OPSS and security if not in SSM when all resources are down (UPCOUNT=0) or indicate that resources are still up after max window. It also gives you more control of making more decisions in the process such as also setting SSM to NOPREREQ mode at your desired x min interval (such as 6 mins into shutdown) to initiate the stopping cmd/process of any resource that may be waiting on some dependencies. (aggressively just stop things since IPLng). You of course can trigger another final pgm at UPCOUNT=0 or event at end of window that does whatever you'd like (just stop OPSS or do something else).

If you want to test/try this sample SHUTSYS code you can either rename your SSMSHUTM rule to SSMSHUTO and then create a SSMSHUTM with this SHUTSYS code or update your shutdown pgm to enable ruleset.SHUTSYS but you will have to modify just a few things so that the rule enables/executes since you are not using the full blown SHUTSYS* sample pgms. To the SHUTSYS logic you would:

1) In the INIT section of the rule, delete the code that checks for the  
   GLVTEMP1.SHUTTYPE variable since you are not using the SHUTSYS1 samp  
   pgm. (lines 51-63). This will allow the rule to get enabled.          
2) At the end of INIT section before )PROC add logic to set the          
   shutrequest simple variable. Again, since not using full SHUTSYS*     
   sample shutdown application, this set is needed for the rule logic.   
   Code:                                                                 
      shutrequest = 'SHUTSYS'                                            
3) Do a find on 'firecnt = 1' to be put in the ALLDONE subroutine.       
   delete the 'ssmdom = OPSVALUE('GLVTEMP1.SSMSHUT','O')' statement and  
   the next statemant  'domit = OPSDOM('D',ssmdom)'. Again, since not    
   using the full blown SHUTSYS* samples this logic would fail if those  
   statements not deleted as the SHUTSYS1 pgm kicks of the first hilited 
   message as to which is DOMed in this rule when it starts. Just remove
   from this 'firecnt = 1' logic. Everywhere else ssmdom/domit is needed.

Good Luck!      

Sharon Mirabella's profile image
Sharon Mirabella

Hi Dave,

I am still working on, or hoping to work on this soon. 

Thanks for the information, I'm still debating all options.

Thanks everyone for the responses!

Sharon