SAS Integration Technologies
provides two interfaces that can be used to send and receive messages
with WebSphere MQ, the Common Messaging Interface, and the WebSphere
MQ Interface. WebSphere MQ (formerly called MQSeries) enables you
to trigger, or start, an application automatically when a message
arrives on a message queue. There are many situations where it is
useful to have a SAS DATA step application started when a message
arrives on a specific queue. However, SAS cannot be started directly
by the trigger monitor. An intermediate batch job is started by WebSphere
MQ, and this batch job calls SAS. The details of one such configuration
and batch job are included here.
The following example
shows a SAS client that runs on Windows XP and uses WebSphere MQ to
communicate with a SAS server that runs on AIX. This SAS client sends
a message to a queue and queue manager on AIX. When the message arrives
on the queue, it triggers a batch job that starts the SAS server to
receive the message and return the requested data set. The WebSphere
MQ Client can connect to a WebSphere MQ server on any supported platform.
WebSphere MQ requires that the trigger monitor and the application
to be started be on the same system, but they can be on either the
client or the server. The process definition, which defines the application
to be triggered, must be defined on the WebSphere MQ server. In this
example, the WebSphere MQ Queue Manager (server installation) is on
the same AIX system as the WebSphere MQ Client.
For more information
about triggering, see the WebSphere MQ Client documentation at
www.ibm.com
.
The following two sample
programs demonstrate the triggering process:
The SAS DATA step
mqclient.sas
runs
on the XP machine and requests a data set. The
mqserver.sas
program
is triggered by the
startsas
batch program
that is described below. It runs on the AIX machine. The
mqserver.sas
program
reads the message off of the queue and returns the requested data
set.