Last week I updated a REXX that is called from a TOD rule, I did not disable and enable the rule. This weekend when the TOD ran the updates were not executed. My question is, does a called REXX routine get compiled when the rule is initially enabled?
)TOD SATURDAY 22:00:02,WEEK , )INIT )PROC /* This TOD rule will remind the operators it's time to shutdown the *//* IMS regions. It will give the operators a chance to make choices *//* as to which IMS regions should come down. In addition all tasks *//* dependent on the IMS region will come down. */ call pimsy exit
Options "NOMAXCLAUSES NOMAXTIME NOMAXSAYS NOMAXCMDS NOMAXSTRING" do until goodreply = 'YES' replytext = 'Do you want to shutdown IMS00Y and its CICSs (YES,NO)?' address WTO "Text('"replytext"') Msgid(OPSNOTIFY) Wait(60)", "Route(2) Reply Hilite" pull edq parse var edq . reply if reply = 'YES' | reply = 'NO' then goodreply = 'YES' end if reply = 'YES' then do address OSF "OI STATESET" CICSZ041 "DESIRED(DOWN)" address OSF "OI STATESET" CICSZ046 "DESIRED(DOWN)" address OSF "OI STATESET" CICSZ051 "DESIRED(DOWN)" address OSF "OI STATESET" CICSA760 "DESIRED(DOWN)" New-did not execute address OSF "OI STATESET" CICSA761 "DESIRED(DOWN)" New-did not execute
" " " " "
if you access a rexx from a rule as a CALL or as a function, it is compiled into the rule. If you change the REXX, you need to disable/reenable the rule to pick it up. If the REXX you are calling from the rule is not something you are waiting on a response on, then best bet is to send it to a server to run ADDRESS OSF OI rexxxname. If you send it to a server, it will capture the latest code in your rexx. A good practice may be... if you have a REXX that is called by a rule, have comments in your REXX that say something like: "IF THIS REXX IS CHANGED, REENABLE THE FOLLOWING RULES" If someone has a better way to keep track of the rules that need to be reenabled, I would love to know how you do it because my method requires you to keep up with comments.
Thanks Sal, that makes me feel better. This is an inherited process, I would need to go change a bunch of rules to get rid of the calls.
And yes if someone has a way of identifying what rules CALL a REXX routine that would be handy.
In this case you're putting out a reply inline in a TOD rule which is not a good idea: The reply will hold up all other TOD rules from executing until replied!
Note that in a future release of OPS/MVS this (until now allowed) wait will be removed, as it is in most other AOF rules.
So you will have to recode to put it on a server anyway in due time.
What Marcel is discussing in his last update is described in the following KD document:
As of today there is no information as to what release of CA OPS/MVS will be implementing this announced and documented product modification.
Thanks Marcel for bringing this subject to the attention of Chris and the rest of the community as well.