Jim - I found out the hard way that when WAKEUP gives you RC=5 that there may be more then one message to be processed.
When I wrote this EXEC I assumed that there was only one message and every once in a while I would lose one. Here is part of an EXEC: 'CP SET SMSG IUCV' Do Forever 'WAKEUP (CONS IUCVMSG RDR ' Say 'Queued =' queued() ' Rc='Rc Select When RC = 1 then Call wakeup_smsg When RC = 2 Then Call wakeup_time When RC = 4 Then Call wakeup_rdr When RC = 5 Then Call wakeup_smsg When RC = 6 Then Call wakeup_cons Otherwise Say 'Unexpected RC='RC 'from WAKEUP.' End /* select */ End /* Do */ Exit {snip} wakeup_smsg: /* ================================================================== */ /* Process SMSG */ /* */ Say 'Smsg queued =' queued() Do m = 1 to queued() Call process_smsg End Return process_smsg: Parse Upper Pull message say message If Word(message,3) = 'LOGOFF' then 'CP LOGOFF' /* Do some processing */ Return /Fran Hensler at Slippery Rock University of Pennsylvania USA for 45 years mailto:f...@zvm.sru.edu http://zvm.sru.edu/~fjh +1.724.738.2153 "Yes, Virginia, there is a Slippery Rock" --------------------------------------------------------------------------