Chapter Contents |
Previous |
Next |
_recvlist |
Syntax | |
Example 1 | |
Example 2 |
Syntax |
CALL SEND(queueInst, '_recvlist', rc <, list1,..,.listn>); |
Where... | Is type... | And represents... |
---|---|---|
rc | N | return code |
list1...listn | L | parameters in which to receive the SCL lists; consists of 0 or more SCL lists to receive into |
When a message is surfaced by a query, it needs to be received into SCL parameters. The _recvlist method supports the receipt of SCL lists only. Use the _recv method to receive the message into numeric and character variables that are not SCL lists.
If an error or warning condition is encountered during the receive, a non-zero return code is returned in the rc parameter. The return codes shown here are a defined set of warning or error conditions that can be checked by using the SYSRC macro, which is provided in the autocall library that is supplied by SAS Institute.
If the rc is not one of the messages shown here, use SYSMSG() to determine the exact error message.
If an unexpected message is received, _recvlist can be called with no receive parameters in order to throw away the message. A truncation warning is returned, but the message will have successfully been received and truncated.
Example 1 |
This example queries on a fetch queue, and then based on the message type, receives the message into the appropriate SCL variables.
header = makelist(); attachlist = makelist(); call send(queueInst, '_query', etype, msgtype, header, attachlist, rc); if (etype = "DELIVERY") then do; if (msgtype = 22) then do; /* receive 2 SCL lists */ namelist = makelist(); agelist = makelist(); call send(queueInst, '_recvlist', rc, namelist, agelist); end; else if (msgtype = 5) then do; /* receive 1 SCL list */ userlist = makelist(); call send(queueInst, '_recvlist', rc, userlist); end; else do; /* unexpected message, force */ /* truncation */ call send(queueInst,'_recvlist', rc); end; end;
Example 2 |
This example throws the message away by forcing truncation.
call send(queueInst, '_recvlist', rc);
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.