CA OPS/MVS

Expand all | Collapse all

Execute RULE or OPS/REXX program just one time

  • 1.  Execute RULE or OPS/REXX program just one time

    Posted 10-10-2016 03:31 PM

    Interested in opinions on best method to execute either a RULE or OPS/REXX routine just one time as the system is coming back up from an IPL.

     

    Thanks



  • 2.  Re: Execute RULE or OPS/REXX program just one time

    Posted 10-11-2016 09:41 AM

    Hello Kurt,

     

    Consider review CA OPS/MVS parameters AOFINITREXX and AOFACTIVEREXX.

    Review the considerations documented for both parameters in this documentation link:

     

    https://docops.ca.com/ca-opsmvs-123-EN/reference-information/parameter-reference/parameters-for-facilities/aof-parameters#AOFParameters-AOFINITREXXParameter

     

    Share with us what kind of processing you are interested to execute.

    There are other places where you could also execute during the IPL of the OPSMAIN Address Space.

     

    Regards, Cesar 



  • 3.  Re: Execute RULE or OPS/REXX program just one time

    Posted 10-11-2016 10:17 AM

    Those parms are just for OPS/MVS startup.  Think he is looking for LPAR IPL.  INITREXX can be used to initialize some variables for the process. Although OPS is usually started at IPL and stays up until system shutdown - need to consider that OPS/MVS could be recycled without an IPL for some reason.  This may/may not require different process, depending on your needs.  You may need to use some flags/globals to keep track that something has run once since IPL, so don't use TEMP globals. .  Maybe the globals would have reference to OPSINFO('IPLTIME') and OPSINFO('IPLDATE') to help determine if it has already fired since last IPL? 

     

    I'm sure there are other ways.

    Sal



  • 4.  Re: Execute RULE or OPS/REXX program just one time

    Posted 10-11-2016 02:37 PM

    Various methods as Sal has pointed out. One method would be to have a rule auto-enabled with just an )INIT section that checks if OPS is initializing for the first time (assumes first start after IPL) and then issues the 'desired' work. Refer to hlq.CCLXRULS(IPLTIME) as a sample...Another method if utilizing SSM is to query the IPL parm that is internally passed to the SSMBEGIN startup rule . Parm is set to Y if OPS was just started after an IPL.



  • 5.  Re: Execute RULE or OPS/REXX program just one time

    Posted 10-13-2016 09:44 AM

    I use the OPS0123O (AOF Initialization Complete) message to key off an IPL. Within the rule I use OPSINFO('PRODUCTSTARTS') to tell how many times CA-OPS has been started since IPL. If it is one then we assume it is an IPL. If it is more than 1 we assume it is a restart and then go from there. I have a REXX which collects the IPL information at this time and sends me an e-mail each time one of our systems is IPL'ed. It also records this in a reference file for use at Disaster Recovery if needed. One caveat that I did find in using this is depending on what you use to send the e-mail (I use JES2MAIL) and how much of your system is up when AOF Initialization is complete, it may be tricky to send an e-mail immediately. Since the information I want doesn't change until the next IPL anyway, I have a dynamic TOD rule to wait for 10 minutes (TOD *+10 MIN) before sending the e-mail.

     

    I decided on OPS0123O because it was the first point that you could safely execute a rule



  • 6.  Re: Execute RULE or OPS/REXX program just one time

    Posted 10-13-2016 10:33 AM

    Travi, that is what we use also, OPS0123O.