Setup tasks
The setup tasks are required when the File Transfer Application is used to send files between
a queue manager and a remote WebSphere MQ client, or between two remote queue managers.
If files are sent between local queue managers or clients, the following setup
tasks are not required.
Sending files between remote queue managers
This section shows how to setup two queue managers to allow the File Transfer Application to
be used to send and receive files between them. For illustration, queue managers HEAD.OFFICE.QM, and SHOWROOM.QM are used. Figure 37 summarizes
the configuration that the following instructions form.
These instruction outline how to setup sender and receiver channels, however
other channel configurations can be used, see WebSphere MQ Intercommunication.
- Issue the following commands on the queue manager HEAD.OFFICE.QM, to create the channels, listener, and the transmission queue:
- Define the sender channel:
DEFINE CHANNEL (HEAD.OFFICE.TO.SHOWROOM) +
CHLTYPE(SDR) +
CONNAME (SERVER.COMPANY.COM) +
XMITQ (SHOWROOM.QM) +
TRPTYPE(TCP)
- Define the receiver channel:
DEFINE CHANNEL (SHOWROOM.TO.HEAD.OFFICE) +
CHLTYPE(RCVR) +
TRPTYPE(TCP)
- Define the listener:
DEFINE LISTENER (HEAD.OFFICE) +
TRPTYPE (TCP) +
PORT (1414)
- Define the transmission queue:
DEFINE QLOCAL (SHOWROOM.QM) +
USAGE (XMITQ)
Notes:
- The TCP/IP connection names specified for the CONNAME attribute in the
sender channel definitions are for illustration only. This is the network
name of the machine at the other end of the connection.
Use the values appropriate for your network.
- Sender and receiver channels have been used however other channel configurations
are available, see the WebSphere MQ Intercommunication manual.
- Issue the following commands on the queue manager SHOWROOM.QM,
to create the channels, listener, and the transmission queue:
- Define the sender channel:
DEFINE CHANNEL (SHOWROOM.TO.HEAD.OFFIE) +
CHLTYPE(SDR) +
CONNAME (SHOWROOM.COMPANY.COM) +
XMITQ (HEAD.OFFICE.QM) +
TRPTYPE(TCP)
- Define the receiver channel:
DEFINE CHANNEL (HEAD.OFFICE.TO.SHOWRROM) +
CHLTYPE(RCVR) +
TRPTYPE(TCP)
- Define the listener:
DEFINE LISTENER (SHOWROOM) +
TRPTYPE (TCP) +
PORT (1414)
- Define the transmission queue:
DEFINE QLOCAL (HEAD.OFFICE.QM) +
USAGE (XMITQ)
- Start the listener and sender channel on the queue manager HEAD.OFFICE.QM by using the following MQSC commands:
- Start the listener:
START LISTENER (HEAD.OFFICE)
- Start the sender channel:
START CHANNEL (HEAD.OFFICE.TO.SHOWROOM)
Note:
The receiver channels do not need to be started because
it is the sender channels that initiate the delivery of messages.
- Start the listener and sender channel on the queue manager SHOWROOM.QM by using the following MQSC commands:
- Start the listener:
START LISTENER (SHOWROOM)
- Start the sender channel:
START CHANNEL (SHOWROOM.TO.HEAD.OFFICE)
- Define a remote queue definition for the destination queue and a source
queue on the queue manager HEAD.OFFICE.QM, using the following
MQSC commands:
- Define a remote queue definition for the destination queue (the queue
where files will be sent):
DEFINE QREMOTE (DEST.AT.SHOWROOM) +
RNAME (SOURCE.AT.SHOWROOM) +
RQMNAME (SHOWROOM.QM)
- Define a source queue (the queue where files will be received):
DEFINE QLOCAL (SOURCE.AT.HEAD.OFFICE)
It is recommended that local queues are dedicated to the File Transfer Application.
- Define a remote queue definition for the destination queue and a source
queue on the queue manager SHOWROOM.QM, using the following MQSC
commands:
- Define a remote queue definition for the destination queue (the queue
where files will be sent):
DEFINE QREMOTE (DEST.AT.HEAD.OFFICE) +
RNAME (SOURCE.AT.HEAD.OFFICE) +
RQMNAME (HEAD.OFFICE.QM)
- Define a source queue (the queue where files will be received):
DEFINE QLOCAL (SOURCE.AT.SHOWROOM)
It is recommended that local queues are dedicated to the File Transfer Application.
- Ensure that all the users of the File Transfer Application are members of the mqm group, or
alternatively the local Administrators group on Windows.
You have now setup both queue managers for use with the File Transfer Application.
Sending files between a queue manager and a remote WebSphere MQ client
This section shows how to setup a queue manager and a remote WebSphere MQ client
to allow the File Transfer Application to be used to send and receive files between them. For
illustration, the queue manager HEAD.OFFICE.QM, and the WebSphere MQ client CARSHOWROOM are used. Figure 38 summarizes the configuration
that the following instructions form.
To configure the queue manager HEAD.OFFICE.QM, and the remote WebSphere MQ client,
do the following:
- Define a server communication channel on the queue manager HEAD.OFFICE.QM, using the following MQSC command:
- Define a server communication channel:
DEFINE CHANNEL (TO.HEAD.OFFICE) +
CHLTYPE(SVRCONN) +
TRPTYPE(TCP) +
MCAUSER (string)
Note:
For MCAUSER (string), specify string as a user from the
mqm group, or administrators group on the queue manager HEAD.OFFICE.
- Define and start a listener on the queue manager HEAD.OFFICE.QM,
using the following MQSC command:
- Define a listener:
DEFINE LISTENER (HEAD.OFFICE) +
TRPTYPE (TCP) +
PORT (1414)
- Start the listener:
START LISTENER (HEAD.OFFICE)
- Define a source queue, and a destination queue on the queue manager HEAD.OFFICE.QM to be used by the WebSphere MQ client, using the following MQSC
commands:
- Define a destination queue (the queue where the WebSphere MQ client will send
files):
DEFINE QLOCAL (CARSHOWROOM.OUTPUT)
- Define a source queue (the queue from which the WebSphere MQ client will receive
files):
DEFINE QLOCAL (CARSHOWROOM.INPUT)
It is recommended that local queues are dedicated to the File Transfer Application.
- On the WebSphere MQ client, create an MQI channel by defining the MQSERVER environment
variable as follows:
TO.HEAD.OFFICE/TCP/SERVER.COMPANY.COM(1414)
For
more information on specifying the environment variable MQSERVER, see the WebSphere MQ Clients book.
Note:
If you intend to implement SSL security,
you must establish the MQI channel using a client channel definition table,
and not by specifying the environment variable MQSERVER.
For
more information on establishing MQI channels, see the WebSphere MQ Clients book.
- Ensure that all the users of the File Transfer Application are members of the mqm group, or
alternatively the local Administrators group on Windows.