This section describes how a SAS
program can use the common messaging interface in order to access
message queues to send and receive messages to other programs. The
common interface alleviates the need for these user programs to use
transport-specific code. This makes the user programs less vulnerable
to changes in the queue's attributes. The programs interact with each
queue in a consistent matter, independent of the transport.
User programs perform
general functions such as the following:
-
initializing the type of transport
and obtaining a unique identifier
-
opening an existing queue by using
a known transport identifier
-
sending messages to a queue by
using a unique queue identifier
-
receiving messages (and possibly
attachments) from a queue
-
-
getting attachments that are associated
with a message (if necessary)
-
copying any desired attachments
to local storage
-
closing all queues upon completion
of the program tasks
-
terminating transports that are
initialized by the program
The following SAS CALL
routines are the basis for initializing or terminating a transport,
opening or closing a queue, and sending or receiving messages and
attachments:
In addition, user programs
can perform transaction processing on transaction queues. Such functions
include the following:
-
creating a transaction object in
order to begin progressing
-
committing or canceling work that
is performed by using a transaction object
-
releasing a transaction object
and any resource that is associated with it
The following SAS CALL
routines are provided for applications that require transaction processing: