Chapter Contents |
Previous |
Next |
_acceptAttachment |
Syntax | |
Example |
Syntax |
CALL SEND(queueInst, '_acceptAttachment', attachlist, rc <, attribs>); |
Where... | Is type... | And represents... |
---|---|---|
attachlist | L | list of attachments to receive |
rc | N | return code |
attribs | C | (optional) attributes |
When invoked on a Queue instance, _acceptAttachment indicates which, (if any) attachments are to be received.
When a _query surfaces a message event, it also surfaces an attachment list if an attachment list was included with the message. Only the attachment list is surfaced by the query, no attachments have actually been transferred at this point. Therefore, the user must indicate which, if any, attachments should be transferred or received by using the _acceptAttachment method. See Accepting Attachments for more information.
If an attachment list is surfaced by the query, _acceptAttachment and the COMPLETE attribute must be called at some point before subsequent sends and/or queries will be allowed. This attribute indicates the completion of attachment receipt. Even if no attachments are to be received, _acceptAttachment must be called with the COMPLETE attribute to indicate completion.
If an error or warning condition is encountered during an attachment transfer, 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 the message shown here, use SYSMSG() to determine the exact error message.
Example |
This example accepts two attachments. The first attachment
is placed in the file WORK.ABC. The second is an external file that will be
placed in
/tmp/text.file
. Setting the COMPLETE flag indicates
that attachment transfer will be complete after these two attachments are
received.
alist = makelist(); att1 = makelist(); rc = setnitemn(att1, 1, "ATTACH_ID"); rc = setnitemc(att1, "WORK", "OUTLIB"); rc = setnitemc(att1, "ABC", "OUT"); att2 = makelist(); rc = setnitemn(att2, 2, "ATTACH_ID"); rc = setnitemc(att2, '/tmp/text.file', "OUTFILE"); rc = insertl(alist, att1); rc = insertl(alist, att2); call send(queueInst,'_acceptAttachment', alist, rc, "COMPLETE");
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.