Find the Next Message

xp_findnextmsg returns the message identifier of the next message in the Adaptive Server inbox.

Use the unread_only parameter to specify the messages for consideration:

Pass the message identifier that is returned by xp_findnextmsg to subsequent procedures that read and delete messages.