Since you showed yours, here's mine. Admittedly not as pretty, but then I don't have a user community. It also handles being used on a service machine that has a secuser. It reduces Frank's original exec to:
/* */ Address Command 'PIPE Rexx SMSGRPY VMUTIL RUALIVE|Locate /IMOKAY/|Count lines|Aggrc' Exit ^rc Isn't this fun??? /* ** SMSG's an arbitrary target SVM, captures responses and inserts ** into the pipeline. */ Parse Upper arg tgtmach what '(' opts ')' ignored Call InitRtn 'CallPipe (Name GetSMsgResp End ?)', 'Literal' timeout_value, '|Delay', '|stopper:Faninany', '|xx:Gate', '?', 'Starmsg *MSG CP SMSG' tgtmach what ||, '|xx:', '|ours:Find 00000001' || Left(tgtmach,8,'_') ||, '|dec:Fanout', '|Take 1', '|Spec /' || msg_wait || '/ 1', '|Elastic', '|Delay', '|stopper:', '?dec:', '|Spec 17-* n', '|*:', '?ours:', '|obnd:Pick 17.10 == /HCPMSG045E/', '|Elastic', '|stopper:', '?obnd:', '|Spec /From/ 1 9.8 strip nw /:/ n 17-* nw', '|Cons' Call CleanUp Exit xRc InitRtn: timeout_value = '+20';msg_wait='+1' what = Strip(what) Parse value Diag(8,'Q SET') with . 'MSG' wasmsg ',' . 'CPCONIO' wascpcio ',' . iRc = 0 popts='' Do while opts <> '' Parse var opts opt opts Select When Abbrev('TIMEOUT',opt,1) |, Abbrev('DELAY',opt,3) then Do Parse var opts timeout_value opts If Pos('.',timeout_value)=1 then timeout_value='0'timeout_value timeout_value = '+' || timeout_value End When Abbrev('WAITCONT',opt,1) |, Abbrev('WAITON',opt,1) then Do Parse var opts msg_wait opts If pos('.',msg_wait)=1 then msg_wait='0'msg_wait msg_wait = '+' || msg_wait End Otherwise popts = Strip(popts opt) End /* select */ End If popts<>'' then what = what'('popts')' If iRc <> 0 then Exit iRc /*>-------<*>-------<*>-------<*>-------<*>-------<*>-------<*/ /* Ensure secuser isn't directing msgs elsewhere */ /*>-------<*>-------<*>-------<*>-------<*>-------<*>-------<*/ dscd = Word(Diag(8,'Q CONS'),3) == 'DISCONNECTED' If dscd then Do Parse value DiagRc(8,'Q PRIV') with . '15'x . ':' myprivs . '15'x If Verify(myprivs,'AC','M')>0 then do_me = '*' Else do_me = '' Parse value DiagRc(8,'Q SECUSER *'), with . '15'x . '15'x suinfo '15'x Parse var suinfo . whoisit . If whoisit<>'not' then Parse value DiagRc(8,'SET SECUSER' do_me 'OFF') with . Else whoisit = '' End 'Commit 0' /* hot to trot */ x=Diag(8,'SET MSG IUCV' || '15'x || 'SET CPCONIO IUCV') Return CleanUp: xRc = Rc x = Diag(8,'SET MSG' wasmsg || '15'x || 'SET CPCONIO' wascpcio) If dscd then if whoisit<>'' then Parse value Diag(8,'SET SECUSER' do_me whoisit) with . Return -- Mike Harding z/VM System Support mhard...@us.ibm.com mike.b.hard...@kp.org mikehard...@mindless.com (925) 926-3179 (w) (925) 323-2070 (c) IM: VMBearDad (AIM), mbhcpcvt (Y!) The IBM z/VM Operating System <IBMVM@LISTSERV.UARK.EDU> wrote on 08/04/2011 10:48:04 AM: > From: Mike Walter <mike.wal...@aonhewitt.com> > To: IBMVM@LISTSERV.UARK.EDU > Date: 08/04/2011 11:07 AM > Subject: Re: Trapping SMSG messages > Sent by: The IBM z/VM Operating System <IBMVM@LISTSERV.UARK.EDU> > > Frank, > > See below for an old, generalized, EXEC that I’ve been using and re- > using for years to use WAKEUP reliably. We have it in our tools > disk, available to all applications programmers as a sample, using > the WAKEUP operands I use most often. It requires requires anyone > using it to plug in their processing at the appropriate points. > > Mike Walter > Aon Corporation > The opinions expressed herein are mine alone, not my employer's.