Chapter Contents

Previous

Next
SAS/CONNECT User's Guide

Send a Message to a Queue

After a queue is opened for delivery, the application can send message(s) to that queue. The parameters are the various pieces of data and the descriptions that compose the message. Optionally, a message type can be sent to indicate the characteristic of the message, such as the number and type of parameters. However, the MSGTYPE parameter would need to be choreographed between the sending and receiving applications to work properly.

Header information for the message can contain user-defined information in addition to a time stamp that shows when the message was removed from the queue. A list of the attachments to accompany the message can also be sent. If there are no attachments, a 0 should be specified. The last parameters are pieces of data that comprise the message. There can be 0 or more numeric or character parameters that are sent.

msgtype = 42;
header = makelist();
rc = setnitemc(header, "Add to inventory.", 
               "DESCRIPTOR");
attachlist = 0;
product = "widgets";
quantity = 35;
action = "ADD";

call send(deliveryQ, '_send', msgtype, header, 
          attachlist, rc, product, quantity, 
          action);


Chapter Contents

Previous

Next

Top of Page

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