Let me know if you want to discuss offline.
Here is an example of some code - you must TEST IT!!!! I DID NOT TEST!
This only kicks off the 15 sec timer to run your rexx and sets
a global with the name of the rule for the 2nd rule to utilize.
To make sure your dynamic rule always a a unique name, I have included
a DYNCNT function. If 2 regions go SOS at same time, and you dont
use a unique dynamic rule name, they will step on each other.
DYNCNT is one way to do this.
Code like this would go into your message rule for SOS:
create your own 'myrexx' to run if the timer pops at 15 seconds
Watch you QUOTES in building the dynamic rules - they are tricky
myglobal = 'GLVJOBID.CICSSOS' /*call whatever you want*/
dynname = 'ABC'DYNCNT() /* ABC is example - use any 3 or less chars*/
CALL OPSCLEDQ /*clear external data queue*/
QUEUE ")TOD *+15 SECONDS"
QUEUE ")PROC"
QUEUE "ADDRESS OSF 'OI myrexx'"
QUEUE ")TERM"
QUEUE "xx = OPSVALUE('"myglobal"','R'")"
QUEUE "RETURN"
ADDRESS "AOF" "ENABLE *DYNAMIC."dynname
xx = OPSVALUE(myglobal,'U',dynname) /*dynname in global*/
RETURN
/************************************************************/
/* Maybe MAKE DYNCNT AN EXTERNAL FUNCTION FOR ALL CODE */
/* So that you generate a unique DYNAMIC rule when necessary*/
/************************************************************/
DYNCNT:
/**********************************************************************/
/* MAKE SURE YOUR DYNRULE PREFIX IS 3 CHARS OR LESS */
/* EXAMPLE : XX = DYNCNT() - RETURNS A NUMBER (1 - 99998) */
/* If you think 99999 is too small for your shop, you need to adjust */
/* to avoid collisions. But it shortens your prefix. */
/**********************************************************************/
glob = 'GLVTEMP1.DYNCNT'
cnt = OPSVALUE(glob,'A',1)
IF cnt >= '99999' THEN
xx = OPSVALUE(glob,'U',0) /*reset*/
RETURN(cnt)