Chapter Contents

Previous

Next
QUEUE_ACCEPT

QUEUE_ACCEPT



Accept attachment.


Syntax
QUEUE_ACCEPT Example

Syntax

CALL QUEUE_ACCEPT(queueId, attachId, ainfo, aname, rc);

Where... Is type... And represents...
queueId N queue identifier
attachId N attachment identifier
ainfo C library name or file specification
aname C member name or filename
rc N return code

When a message is surfaced by a query, the QUEUE_QUERY CALL routine returns a flag that indicates whether attachments were included with the message. If attachments were included with the message, QUEUE_GETATT can be invoked to obtain specific attachment information. QUEUE_GETATT returns information for one specific attachment and it identifies that attachment by the attachment identifier. The attachment identifier returned by QUEUE_GETATT should be specified in the attachId parameter to identify which attachment you are accepting. QUEUE_ACCEPT accepts the attachment; that is, the attachment is transferred and written out to the file that is specified by the ainfo and aname parameters.

If the attachment that is being accepted is a catalog or a data set, the ainfo parameter should specify the output library name. The aname parameter should specify the output member name.

If the attachment is an external file (either binary or text), the ainfo parameter should indicate the file specification. It must have a value of either FILENAME or FILEREF. If ainfo is set to FILENAME, the aname parameter should specify the output file's physical filename. If ainfo is set to FILEREF, then the aname parameter should indicate the name of the fileref that defines the output external file.

If an error or a warning condition is encountered, a non-zero return code is returned in the rc parameter. Use the SYSMSG() function to print the message that is associated with the non-zero rc.


QUEUE_ACCEPT Example

This example accepts the attachment that is identified by attachId into the data set SASUSER.CENSUS.

lib = "SASUSER";
mem = "CENSUS";
call queue_accept(queueId, attachId, 
                  lib, mem, rc);


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.