× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If I have this logic:
IF COND(&MSGID *EQ 'CPF1816') THEN(DO)
RTVSYSVAL QDATETIME &PwrFail
/* CPF1817: System utility power restored at &2. */
/* Wait 10 minutes or 600 seconds. But don't wait in one big chunk in
*/
/* case someone jumps the gun and issues a controlled end to the system
*/
/* or this job. */
Chgvar &EndSts '0'
RTVSYSVAL QDATETIME &CurDT
CALLPRC PRC(CLDURATION) PARM((&PwrFail) (&CurDT)) RTNVAL(&PwrFailLen)

dountil ((&PwrFailLen *ge 600) *or (&msgid *eq 'CPF1817') *or +
(&EndSts='1'))
RCVMSG MSGQ(&MsgQLib/&MsgQName) WAIT(10) MSGID(&MSGID) RMV(*NO)
RTVJOBA ENDSTS(&EndSts)
RTVSYSVAL QDATETIME &CurDT
CALLPRC PRC(CLDURATION) PARM((&PwrFail) (&CurDT)) RTNVAL(&PwrFailLen)
EndDo /* Check for power restored */
IF COND(&MSGID *EQ 'CPF1817') THEN(GOTO CMDLBL(WaitOnFail)) /* power
back */
IF COND(&ENDSTS *EQ '1') THEN(GOTO CMDLBL(END)) /* controlled end
requestd */
/* If someone else is doing a controlled system end request I have
no */
/* idea how long they gave the system to end controlled. Nor do I
know */
/* if they are handling the safe shutdown of the system. If they're
*/
/* going to jump in then they better finish the job */
ENDDO

and the message CPF1817 goes to the message queue after the timeout on the
RCVMSG line but before it loops back to RCVMSG does the RCVMSG catch that
message or only new messages?
I guess a test would be send some messages to a message queue. Start a
test program that does a RCVMSG against that queue. Does the test return
the missed message(s) or does it only wait on new messages?


Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.