Chapter Contents

Previous

Next
QUEUE_SEND

QUEUE_SEND



Send message to a queue.


Syntax
QUEUE_SEND Example

Syntax

CALL QUEUE_SEND(queueId, msgtype, rc);

Where... Is type... And represents...
queueId N queue identifier
msgtype N user-specified message type
rc N return code

When QUEUE_SEND is invoked:

The msgtype parameter is set by the user when the message is sent and is surfaced on the receiving side upon return from the query. When surfaced by the query on the receiving side, the message type can be used to determine how many and what type of parameters should be used in receiving the actual message from the QUEUE_RECV CALL routine.

If an error or a warning condition is encountered during the send, 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_SEND Example

This example causes the string "SAS Institute Inc." and the data set attachment SASUSER.A to be sent to the queue that is identified by queueId.

company="SAS Institute Inc.";
call queue_setparm(queueId, rc, company);

lib="SASUSER";
mem="A";
type="DATASET";
call queue_setatt(queueId, rc, type, 
                  lib, mem);

   /*************************************/
   /* Set message type so that receiving */
   /* side knows how many and what types */
   /* of parameters to receive.          */
   /*************************************/
msgtype = 22;

   /*************************************/
   /* Sent message and attachment to    */
   /* queue.                            */
   /*************************************/
call queue_send(queueId, msgtype, rc);


Chapter Contents

Previous

Next

Top of Page

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