Previous Page | Next Page

Using the SAS Common Messaging Interface

Writing Applications Using the Common Messaging Interface


Introduction to Writing Applications with the Common Messaging Interface

Two general types of programs can use the common messaging interface. One uses the interface to administer information about the message transports. Another uses the interface to send and receive messages between applications. These two types of programs are discussed in the sections below.

Note:   The SAS®9 Common Messaging Interface uses the SAS®9 data set format by default. In order to send and receive SAS Release 8 data sets, you must include the "ATTACH_VERSION=VERSION_8" option in the data set option list on the SENDMESSAGE call. If you do not use the "ATTACH_VERSION=VERSION_8" option on the SENDMESSAGE call, then received data sets are stored in the SAS®9 format. If you might be sending data sets to another SAS session that is running SAS Release 8.2 or earlier, then use the ATTACH_VERSION= option to exchange data sets in a format that can be interpreted by both applications.  [cautionend]


Administrator Programs

SAS programs can use the common messaging interface in order to administer the information in the repository for the queues. The goal of such an administrator program is to encapsulate all information about the queues so that all other programs in the application can focus on using the queues rather than configuring them. This not only simplifies the other programs, but also makes the queues easier to administer by having all of this information in one location.

Administrator programs perform general functions, such as the following:

The following SAS CALL routines are used to administer the information repository:

Other functions of the administration process include removing any unneeded information in the repository. This encompasses functions such as the following:

The following SAS CALL routines are used to administer these aspects of the information repository:


User Programs

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:

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:

The following SAS CALL routines are provided for applications that require transaction processing:

Previous Page | Next Page | Top of Page