![]() |
MQSeries Interface |
![]() ![]() |
With MQSeries messaging, two or more applications communicate with each other indirectly and asynchronously using message queues. The applications do not have to be running at the same time or even in the same operating environment. An application wishing to communicate with another application simply sends a message to a queue. The receiving application retrieves the message when it is ready.
A typical SAS program using MQSeries services performs the following tasks:
Note: A program can have connections to more than one queue manager if the platform supports multiple queue managers running on it.
MQSeries provides two Message Queue Interface (MQI) models:
IBM requires programs to be linked with different libraries according to the model that will be used. The default model that is assumed by SAS is the Base/Server model. If you do not want the default model, you must specify the MQMODEL SAS macro variable and set it to a value of CLIENT. For example,
%let MQMODEL=CLIENT;
You must set this variable before calling any MQSeries interface function.
If the program is using the client model, it will open a remote queue manager, since MQSeries clients always connect across a network.
If you have licensed Candle's MQSecure product, you can enable its interface by specifying the MQSECURE SAS macro variable and setting it to a value of ENABLE or ON. For example,
%let MQSECURE=ENABLE;
You must set this variable before calling any MQSeries interface function. MQSecure requires userid/password contexts for signing and encrypting messages. By default, the program will prompt the user for this information at execution time. To override this interactive prompting, set the following macro variables:
%let MQSIGNEE=userid.passwd - identification of signee %let MQENCRYPTID=userid - userid to whom the message is destined %let MQDECRYPTPW=passwd - password of user to whom the message is destined
Currently, the MQSecure interface can only be enabled while running under the Windows platform.
If you will be putting or getting messages from heterogeneous systems, then data conversion must be considered. Data conversion is usually categorized as follows:
The Coded Character Set ID (CCSID) or code page is a number that represents a character translation table to be used between two distinct systems. Encoding is the term generally used to represent how numeric data is represented on a particular system. MQSeries channel communication (Transmission Segment Header and Message Descriptor) data are converted internally by MQSeries, however, the user portion of a message is not. It is the responsibility of the program to convert this data to the native code page and numeric encoding.
Data conversion of this user portion can be handled by either MQSeries conversion exit routines or by SAS using data mapping control. If you want MQSeries to do the data conversion of the user portion of a message, you must adhere to the following protocol:
By default, if you do not specify the CONVERT Get Message Option, SAS performs data conversion if required (when incoming message encoding does not match native encoding). If you want to disable or turn off this type of transparent data conversion, specify the MQSASCNV SAS macro variable and set it to a value of DISABLE or OFF. For example,
%let MQSASCNV=OFF
SAS will perform data conversion based upon the data mapping (MQMAP) being passed to the MQGETPARMS routine. SAS performs origin-to-destination code page translation by using supplied or user-generated translation tables (TRANTAB entries in SASHELP.HOST or SASUSER.PROFILE). To override internal TRANTAB name generation, you can specify the MQSASTBL SAS macro variable and set it to the TRANTAB (translation table) that you want to use.
![]() |
MQSeries Interface |
![]() ![]() |