skills/using-ibm-websphere-mq/SKILL.md
# Using IBM WebSphere MQ Adapters in Productions About the IBM WebSphere MQ Adapters The InterSystems IRIS® IBM WebSphere MQ inbound and outbound adapters enable your productions to retrieve messages from and send messages to message queues of InterSystems IRIS IBM WebSphere MQ. This topic provides a brief introduction to these adapters. It is assumed that you are reasonably familiar with the IBM WebSphere MQ product and have access to its formal documentation. ### 1.1 Prerequisites In orde
npx skillsauth add sorodriguezz/skills-objectscript skills/using-ibm-websphere-mqInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
About the IBM WebSphere MQ Adapters
The InterSystems IRIS® IBM WebSphere MQ inbound and outbound adapters enable your productions to retrieve messages from and send messages to message queues of InterSystems IRIS IBM WebSphere MQ. This topic provides a brief introduction to these adapters.
It is assumed that you are reasonably familiar with the IBM WebSphere MQ product and have access to its formal documentation.
In order to use InterSystems IRIS IBM WebSphere MQ inbound and outbound adapters, make sure that you have access to IBM WebSphere MQ as described in Sending and Receiving IBM WebSphere MQ Messages.
The adapters use a dynamic-link library that is automatically installed by InterSystems IRIS on all suitable platforms. (This is MQInterface.dll on Windows; the file e xtension is different for other platforms.) In turn, the InterSystems IRIS dynamic- link library requires IBM WebSphere MQ dynamic-link libraries (the IBM WebSphere MQ client).
In general, the inbound IBM WebSphere MQ adapter (EnsLib.MQSeries.InboundAdapter) accesses a given queue manager, using a given channel, retrieves messages from a given queue, and sends those messages (as instances of EnsLib.MQSeries.Message) to the associated business service.
The adapter provides runtime settings that you use to specify items like the following:
The queue manager to use.
The channel specification to use. This specification includes the name of the channel to use, the transport used by the channel, the server name (or IP address) that is running the IBM WebSphere MQ server, and the port.
The message queue to check.
A polling interval, which controls how frequently the adapter checks for new input.
About the IBM WebSphere MQ Adapters
The IBM WebSphere MQ outbound adapter (EnsLib.MQSeries.OutboundAdapter) provides settings that you use to specify the following:
The queue manager to use.
The channel specification to use. This specification includes the name of the channel to use, the transport used by the channel, the server name (or IP address) that is running the IBM WebSphere MQ server, and the port.
The message queue to send messages to.
It provides a method to send a message to the given queue.
Unlike many other production adapters, the IBM WebSphere MQ inbound and outbound adapters do not write to the Event Log when they process messages sent to or received from outside InterSystems IRIS. To see the inbound and outbound traffic, you can, ho wever, use the message browser as usual.
Using the IBM WebSphere MQ Inbound Adapter
This topic describes the default behavior of the InterSystems IRIS® IBM WebSphere MQ inbound adapter (EnsLib.MQSeries.InboundAdapter) and describes how to use this adapter in your productions.
First, it is useful to understand the details that you specify for the adapter. The EnsLib.MQSeries.InboundAdapter class provides runtime settings that you use to specify items like the following:
The queue manager to use.
The channel specification to use. This specification includes the name of the channel to use, the transport used by the channel, the server name (or IP address) that is running the IBM WebSphere MQ server, and the port.
The message queue to check.
A polling interval, which controls how frequently the adapter checks for new input.
In general, the inbound IBM WebSphere MQ adapter (EnsLib.MQSeries.InboundAdapter) periodically checks the given queue, retrieves any messages, and sends the messages (as instances of EnsLib.MQSeries.Message) to the associated business service. The business service, which you create and configure, uses these messages and communicates with the rest of the production. The following figure sho ws the overall flo w:
Using the IBM WebSphere MQ Inbound Adapter
More specifically:
When the adapter is initialized, it connects to the given queue manager and queue, using the given channel.
The adapter regularly executes its OnTask() method, which retrieves a message from the queue (if a message is
available). The polling interval is determined by the CallInterval setting.
a. The adapter creates an instance of the EnsLib.MQSeries.Message class and puts the message data into it.
b. The adapter calls the internal ProcessInput method of the associated business service class, passing the
EnsLib.MQSeries.Message instance as input.
The internal ProcessInput() method of the business service class executes. This method performs basic production tasks such as maintaining internal information as needed by all business services. You do not customize or override this method, which your business service class inherits.
The ProcessInput() method then calls your custom OnProcessInput() method, passing the EnsLib.MQSeries.Message instance as input. The requirements for this method are described in Implementing the OnProcessInput Method.
The response message follows the same path, in reverse.
To use this adapter in your production, create a new business service class as described here. Later, add it to your production and configure it . You must also create appropriate message classes, if none yet exist. See Defining Messages .
The following list describes the basic requirements of the business service class:
Your business service class should extend Ens.BusinessService.
In your class, the ADAPTER parameter should equal EnsLib.MQSeries.InboundAdapter.
Your class should implement the OnProcessInput() method, as described in Implementing the OnProcessInput Method.
For other options and general information, see Defining a Business Service Class .
Implementing the OnProcessInput() Method
The following example shows the general structure that you need:
Class Definition
Class EMQS.Service Extends Ens.BusinessService { Parameter ADAPTER = "EnsLib.MQSeries.InboundAdapter";
Method OnProcessInput(pInput As EnsLib.MQSeries.Message, pOutput As %RegisteredObject) As %Status { set tsc=$$$OK //your code here Quit tsc } }
Within your custom business service class, your OnProcessInput() method should have the following signature:
Method OnProcessInput(pInput As EnsLib.MQSeries.Message, pOutput As %RegisteredObject) As %Status
Here pInput is the message object that the adapter will send to this business service; this is an instance of EnsLib.MQSeries.Message. Also, pOutput is the generic output argument required in the method signature.
The OnProcessInput() method should do some or all of the following:
later.
For information on creating message classes, see “Defining Messages ” in Developing Productions.
For the request message, set its properties as appropriate, using values in the MQ message.
Call a suitable method of the business service to send the request to some destination within the production. Specifically , call SendRequestSync(), SendRequestAsync(), or (less common) SendDeferredResponse(). For details, see Sending Request Messages.
Each of these methods returns a status (specifically , an instance of %Status).
have received. This step is required.
See the example at the end of this topic.
The adapter sends an instance of EnsLib.MQSeries.Message to your business service. This object contains the message retrieved from the queue. It has three properties:
Body—The body of the message.
MessageID—The message ID.
Using the IBM WebSphere MQ Inbound Adapter
The following business service retrieves messages and forwards them to a business host named EMQS.MessageProcessor.
Class Definition
Class EMQS.Service Extends Ens.BusinessService {
Parameter ADAPTER = "EnsLib.MQSeries.InboundAdapter";
Method OnProcessInput(pInput As EnsLib.MQSeries.Message, pOutput As EMQS.InboundMsg) As %Status { //create production message to carry the retrieved MQ message Set inbound=##class(EMQS.InboundMsg).%New() Set inbound.Body=pInput.Body Set inbound.MessageId=pInput.MessageId
//forward this to the message processor Set tsc=..SendRequestSync("EMQS.MessageProcessor",inbound,.response) Set pOutout=response Quit tsc }
}
The message class EMQS.InboundMsg is as follows:
Class Definition
Class EMQS.InboundMsg Extends Ens.Request {
Property Body As %String (MAXLEN="");
Property MessageId As %String(MAXLEN = 128);
}
To add your business service to a production, use the Management Portal to do the following:
Add an instance of your business service class to the production.
Enable the business service.
Configure the adapter to access an IBM WebSphere MQ queue and retrieve messages. Specifically:
Specify the queue manager, channel, and queue to access. The channel specification includes the name of the channel to use, the transport used by the channel, the server name (or IP address) that is running the IBM WebSphere MQ server, and the port.
Specify the error log to use.
Specify the character set to convert the messages to.
Specify how often the adapter looks for messages.
These topics are discussed in Settings for the IBM WebSphere MQ Adapters.
Adding and Configuring the Business Service
Using the IBM WebSphere MQ Outbound Adapter
This topic describes the behavior of the InterSystems IRIS® IBM WebSphere MQ outbound adapter (EnsLib.MQSeries.OutboundAdapter) and describes how to use this adapter in your productions.
Within a production, an outbound adapter is associated with a business operation that you create and configure. The business operation receives a message from within the production, looks up the message type, and executes the appropriate method. This method usually executes methods of the associated adapter.
The IBM WebSphere MQ outbound adapter (EnsLib.MQSeries.OutboundAdapter) provides settings that you use to specify the following:
To create a business operation to use the EnsLib.MQSeries.OutBoundAdapter, you create a new business operation class. Later, add it to your production and configure it
.
You must also create appropriate message classes, if none yet exist. See Defining Messages .
The following list describes the basic requirements of the business operation class:
Your business operation class should extend Ens.BusinessOperation.
In your class, the ADAPTER parameter should equal EnsLib.MQSeries.OutboundAdapter.
In your class, the INVOCATION parameter should specify the invocation style you want to use, which must be one of the following.
–
Queue means the message is created within one background job and placed on a queue, at which time the original job is released. Later, when the message is processed, a different background job will be allocated for the task. This is the most common setting.
Using the IBM WebSphere MQ Outbound Adapter
–
InProc means the message will be formulated, sent, and delivered in the same job in which it was created. The job will not be released to the sender’s pool until the message is delivered to the target. This is only suitable for special cases.
{ <MapItems> <MapItem MessageType="messageclass"> <Method>methodname</Method> </MapItem> ... </MapItems> }
Method Sample(pReq As RequestClass, Output pResp As ResponseClass) As %Status
Here Sample is the name of the method, RequestClass is the name of a request message class, and ResponseClass is the name of a response message class. In general, these methods will refer to properties and methods of the Adapter property of your business operation.
The following example shows the general structure that you need:
Class Definition
Class EMQS.NewOperation1 Extends Ens.BusinessOperation { Parameter ADAPTER = "EnsLib.MQSeries.OutboundAdapter";
Parameter INVOCATION = "Queue";
Method SampleCall(pRequest As Ens.Request, Output pResponse As Ens.Response) As %Status { Quit $$$ERROR($$$NotImplemented) }
{ <MapItems> <MapItem MessageType="Ens.Request"> <Method>SampleCall</Method> </MapItem> </MapItems> } }
When you create a business operation class for use with EnsLib.MQSeries.OutboundAdapter, typically your main task is writing message handlers for use with this adapter, that is, methods that receive production messages and then send messages to an IBM WebSphere MQ server.
Each message handler method should have the following signature:
Method Sample(pReq As RequestClass, Output pResp As ResponseClass) As %Status
Example
Here Sample is the name of the method, RequestClass is the name of a request message class, and ResponseClass is the name of a response message class.
In general, the method should do the following:
Examine the inbound request message.
Call the SendMessage() method of the adapter to send a message to the configured queue of IBM WebSphere MQ.
Examine the response.
Use information in the response to create a response message (an instance of Ens.Response or a subclass), which the
method returns as output.
For information on defining message classes, see Defining Messages .
step is required.
The adapter provides the following method:
SendMessage()
Method SendMessage(pBody) As %Status
Sends a message to the configured queue of IBM WebSphere MQ message. Note that pBody can be either a datatype or a character stream, but cannot be binary data or an object.
The following business operation sends a message to IBM WebSphere MQ:
Class Definition
Class EMQS.Operation Extends Ens.BusinessOperation {
Parameter ADAPTER = "EnsLib.MQSeries.OutboundAdapter";
Parameter INVOCATION = "Queue";
Method Send(pRequest As OutboundMsg, Output pResponse As OutboundMsgResponse) As %Status { Set string=pRequest.Body
//Get part of the message so that we can provide //some information in the response message Set snippet=$Extract(string,1,50)
//send the message to the configured queue Set status=..Adapter.SendMessage(string) If $$$ISERR(status) { Do $System.Status.DisplayError(status) Quit $$$ERROR($$$GeneralError,"Error sending message") }
//create the response message Set pResponse=##class(EMQS.OutboundMsgResponse).%New() Set pResponse.Body="Message sent: "_snippet
Quit status
Using the IBM WebSphere MQ Outbound Adapter
}
{ <MapItems> <MapItem MessageType="EMQS.OutboundMsg"> <Method>Send</Method> </MapItem> </MapItems> }
}
To add your business operation to a production, use the Management Portal to do the following:
Add an instance of your custom business operation class to the production.
Enable the business operation.
Configure the adapter to access an IBM WebSphere MQ queue and send messages. Specifically:
Specify the queue manager, channel, and queue to access. The channel specification includes the name of the channel to use, the transport used by the channel, the server name (or IP address) that is running the IBM WebSphere MQ server, and the port.
Specify the error log to use.
Indicate the character set that the messages are in.
These topics are discussed in Settings for the IBM WebSphere MQ Adapters.
Troubleshooting IBM WebSphere MQ Adapters
If you encounter problems when using the adapters for IBM WebSphere MQ, you should first determine whether the client is correctly installed and can communicate with the server. To perform such a test, you can use sample programs that are provided by IBM WebSphere MQ. The executables are in the bin directory of the IBM WebSphere MQ client.
The following steps describe how to use these sample programs on Windows. The details may be different on other operating systems; consult the IBM documentation and check the names of the files present in your client.
Create an environment variable called MQSERVER. Its value should be of the form channel_name/transport/server, where channel_name is the name of the channel to use, transport is a string that indicates the transport to use, and server is the name of the server. For example: S_testsystem/TCP/testsystem
At the command line, enter the following command:
amqsputc queue_name queue_manager_name
where queue_name is the name of the queue to use and queue_manager_name is the name of the queue manager. For example:
amqsputc testqueue QM_testsystem
If the amqsputc command is unrecognized, make sure that the PATH environment variable has been updated to include the bin directory of the IBM WebSphere MQ client.
In case of other errors, consult the IBM documentation.
Sample AMQSPUT0 start target queue is testqueue
sample message 1 sample message 2
Sample AMQSPUT0 end
Troubleshooting IBM WebSphere MQ Adapters
line:
amqsgetc queue_name queue_manager_name
where queue_name is the name of the queue to use and queue_manager_name is the name of the queue manager. For example:
Sample AMQSGET0 start message <sample message 1> message <sample message 2>
no more messages Sample AMQSGET0 end
If the test fails, consult the IBM documentation. Possible causes of problems include the following:
Security issues
Queue is not defined correctly
Queue manager is not started Settings for the IBM WebSphere MQ Adapters
This section provides reference information for the IBM WebSphere MQ adapters (EnsLib.MQSeries.InboundAdapter and EnsLib.MQSeries.OutboundAdapter). You can configure these settings after you have added an applicable business host to your production.
Also see Settings in All Productions.
For both the inbound and outbound adapters to IBM WebSphere MQ, you specify settings that describe the connection to a given queue. The details are nearly identical for both adapters.
Also see Prerequisites.
Specify values for the following settings in order to specify the message queue of interest, the queue manager to use, and the channel to use:
QueueName
(Required) Specifies the queue name; this should be a v alid queue for the specified queue manager . Also, you must have permission to use this queue.
QueueManager
Specifies the queue manager; this should be a v alid queue manager on the IBM WebSphere MQ server and you must have permission to use it.
If you omit this setting, the system uses the default queue manager, as configured in IBM WebSphere MQ. Or, if IBM WebSphere MQ has been the configured so that the queue manager is determined by the queue name, the system uses the queue manager that is appropriate for the given queue name.
Settings for the IBM WebSphere MQ Adapters
Channel
The specification for the channel, in the follo wing form:
"channel_name/transport/host_name(port)"
Here channel_name is the name of the channel to use, transport is the transport used by the channel, host_name is the server name (or IP address) that is running the IBM WebSphere MQ server, and port is the port that this channel should use.
Transport can be one of the following: TCP, LU62, NETBIOS, SPX
For example:
"CHAN_1/TCP/rodan(1401)"
"CHAN_1/TCP/127.0.0.1(1401)"
If the MQ Server supports this, you can use a comma-separated list of host names with ports. For example: CHAN_1/TCP/rodan(1401),rodan2(1401)
If you omit this setting, the system uses the default channel specification, as configured in IBM WebSphere MQ. Or, if the system has been the configured so that the channel is determined by the queue name, the system uses the channel that is appropriate for the given queue name.
Use the following setting to specify the log file to write to.
ErrorFile
Specifies the log file to write error messages to. If you omit this setting, no logging occurs.
You can specify the character set to use for message conversion.
CharSet
Specifies an inte ger Coded Character Set ID (CCSID) as used in IBM WebSphere MQ.
For the inbound adapter, this is the character set to convert the messages to. If you do not specify a character set, the MQ system assumes the messages use the default character set specified for the MQ client.
For the outbound adapter, this setting specifies the character set that the messages are already in; no con version is done.
For information on character sets and translation tables, see Translation Tables.
Specifying How Often to Check for Messages
This applies only to the inbound adapter. To specify how often to check for messages, use the following setting:
CallInterval
Number of seconds that the adapter will wait before checking again for new messages, before checking for a shutdown signal from the production framework.
If the adapter finds input, it acquires the data and passes it to the b usiness service. The business service processes the data, and then the adapter immediately begins waiting for new input. This cycle continues whenever the production is running and the business service is enabled and scheduled to be active.
The default CallInterval is 5 seconds. The minimum is 0.1 seconds.
For any settings not listed here, see Configuring Productions .
The examples in this book used an IBM WebSphere MQ server running on a machine named testsystem, using the port 1414. The user ID under which the examples were run was authorized to use the queue manager QM_testsystem and a queue named testqueue. InterSystems IRIS used a TCP channel named S_testsystem to communicate with the server. The following table lists the settings:
Setting
Value
Queue Manager
QM_testsystem
Channel
S_testsystem/TCP/testsystem(1414)
Queue Name
testqueue
Error File
c:\mq-log.txt
data-ai
# XDBC Gateway XDBC Gateway Overview The XDBC Gateway provides a single interface for connecting InterSystems IRIS® to an external database with JDBC or ODBC. It acts as the modern, streamlined successor to the SQL Gateway. The XDBC Gateway acts like a JDBC or ODBC driver and lets you perform any of the following operations: - Access data stored in third-party relational databases within InterSystems IRIS applications. - Store persistent InterSystems IRIS objects in external relational data
devops
# Windows Installation Guide Windows Installation Overview The Windows Installation Guide provides guidance on installing kit-based deployments on Microsoft Windows. ### 1.1 How to Use This Guide For all installations, you should begin with the Pre-Installation steps. You can then follow the steps for either an attended or unattended installation. The attended installation process is different depending on the setup type you choose. After following the steps for attended installations, use t
testing
# Windows Installation Details Windows User Accounts When installing InterSystems IRIS, you must choose the Windows user account to run the InterSystems service, InterSystems IRIS Controller for <instance-name>. There are two options: - The default SYSTEM account (Windows Local System account). This is used in Minimal security installations. - A defined Windows user account. This account must have interactive login privileges for the duration of the installation; they can be revoked after.
tools
# Web Gateway Guide C.2.1 Method 1: Building the CSP Module as Shared Object with apxs (APache eXtenSion) Appendix D: Add the Web Gateway to a Locked-Down Apache Installation (UNIX®/Linux/macOS) The Web Gateway: Serve InterSystems Web Applications and REST APIs to a Web Client An InterSystems IRIS® web application consists of code which provides content dynamically to a web client (usually a web browser) in response to a request. The InterSystems Web Gateway makes this possible: it is a soft