Chapter Contents

Previous

Next
QUEUE_SETATT

QUEUE_SETATT



Define attachments.


Syntax
QUEUE_SETATT Example

Syntax

CALL QUEUE_SETATT(queueId, rc, atype, ainfo, aname <, atype, ainfo, aname...>);

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

QUEUE_SETATT defines the attachments that are to be included with the next message that is sent by using the QUEUE_SEND CALL routine. For each attachment, three pieces of information must be specified:

One or more attachments may be defined, but all three pieces of information must be included for each attachment.

If an error occurs, rc is updated and returned as a non-zero value. Use the SYSMSG() function to print the message that is associated with the non-zero rc.

The atype parameter specifies the attachment type. The ainfo and aname parameters will be set differently depending on the value of atype.

The atype parameter should be one of the following:

DATASET or CATALOG
If the attachment is a catalog or a data set, the ainfo parameter will be the attachment's library name. The aname parameter will be the attachment's member name.

When data set attachments are transferred, all data set attributes are cloned by default. These include label, type, password, encryption, index, and sort information.

EXTERNAL_TEXT or EXTERNAL_BIN
If the attachment is an external file (either binary or text), the ainfo parameter will be the file specification. It must have a value of either FILENAME or FILEREF. If ainfo is set to FILENAME, the aname parameter will contain the attachment's physical filename. If ainfo is set to FILEREF, the aname parameter will contain the name of the fileref that defines the external file.


QUEUE_SETATT Example

This example defines three attachments to the queue that is defined by queueId.

   /*************************************/
   /* Attachment one is the data set    */
   /* SASUSER.EMPLOYEE.                 */
   /*************************************/
type1 = "DATASET";
lib1 = "SASUSER";
mem1 = "EMPLOYEE";

   /*************************************/
   /* Attachment two is the external    */
   /* text file that is defined by the  */
   /* fileref RLINK.                    */
   /*************************************/
type2 = "EXTERNAL_TEXT";
fspec = "FILEREF";
fref = "RLINK";

   /*************************************/
   /* Attachment three is an external   */
   /* binary file.                      */
   /*************************************/
type3 = "EXTERNAL_BIN";
fspec3 = "FILENAME";
fname3 = "/tmp/binary.file";

call queue_setatt(queueId, rc, 
                  type1, lib1, mem1, 
                  type2, fspec, fref,
                  type3, fspec3, fname3);


Chapter Contents

Previous

Next

Top of Page

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