Difference between revisions of "MQCURMSGS()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 33: | Line 33: | ||
mqclose(mqdes) | mqclose(mqdes) | ||
</code> | </code> | ||
+ | |||
==Products== | ==Products== |
Revision as of 16:29, 17 November 2009
Purpose
Return the number of unread messages in the specified queue
Syntax
MQCURMSGS(<expN>)
See Also
MQCLOSE(), MQCREATE(), MQOPEN(), MQRECEIVE(), MQSEND()
Description
The MQCURMSGS() function returns the current number of unread messages in the queue specified by <expN>.
Example
mqdes=mqopen("/myqueue") if (mqdes < 0) messagebox(strerror()+",errno="+alltrim(str(error()))) return endif do while (mqcurmsgs(mqdes) > 0) mstr=mqreceive(mqdes) if (empty(mstr)) messagebox(strerror()+",errno="+alltrim(str(error()))) return endif messagebox(mstr) end do mqclose(mqdes)
Products
Recital, Recital Server