Create an IBM MQ File Transfer structure
We can configure a Managed File Transfer structure, based on a single agent connected to a queue manager on the same machine.
The MFT configuration is stored in a file structure under the IBM MQ DataPath, on the machine that the agent will be located.
The following sample configuration is for an MFT Version 8.0 queue manager named SAMPLECOORD (with security disabled), and a single MFT agent named SAMPLEAGENT:+--- config +--- SAMPLECOORD +--- command.properties +--- coordination.properties +--- SAMPLECOORD.mqsc +--- agents +--- SAMPLEAGENT +--- agent.properties +--- SAMPLEAGENT_create.mqsc +--- SAMPLEAGENT_delete.mqsc +---logs +--- SAMPLECOORD +--- agents +--- SAMPLEAGENT +--- logsThis example assumes that queue manager security has been disabled. The following commands, run in runmqsc, will disable security after the queue manager is restarted:
runmqsc queue manager alter qmgr CONNAUTH(NONE); alter qmgr CHLAUTH(DISABLED); end;For configuration with security enabled in MFT Version 8.0 or later, CONNAUTH requires all MFT commands that connect with a queue manager to supply user ID and password credentials. We can apply the additional parameters -mquserid and -mqpassword for each command, or define a MQMFTCredentials.xml file. The following sample credential file defines the user ID of fteuser, for which the password of MyPassword is to be used when connecting to the queue manager SAMPLECOORD:
<tns:mqmftCredentials xmlns:tns="http://wmqfte.ibm.com/MQMFTCredentials" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://wmqfte.ibm.com/MQMFTCredentials MQMFTCredentials.xsd"> <tns:qmgr mqPassword="MyPassword" MyUserId="fteuser" name="SAMPELCOORD"/> </tns:mqmftCredentials>
For more information, see MFT and IBM MQ connection authentication.
Notes:- To locate your MFT configuration directory, use the fteDisplayVersion -v command.
- For z/OS users, the MQMFTCredential.xml file can be located as a member in a partitioned data set with variable record format (RECFM=V), or undefined record format (RECFM=U)..
- For configuration with security enabled, add the following parameter to the steps below to associate the credentials with the relevant queue manager: -credentialsFile full credential file path.
- The clear text password in the MQMFTCredential.xml can
be obfuscated using the following command:
fteObfuscate -credentialsFile full file path to MQMFTCredentials.xml
Procedure
-
Create a coordination queue manager.
A coordination queue manager is a single queue manager, used to receive all transfer log and
status information from its agents. Run the following command:
fteSetupCoordination -coordinationQMgr coordination_qmgr_name
This creates the basic top level configuration, and create an IBM MQ script file to call coordination_qmgr_name.mqsc. The configuration then needs to be loaded into the queue manager, by running the following IBM MQ command:runmqsc queue manager name < coordination_qmgr_name.mqsc
Note: For TCP client connection to a queue manager, we can use:fteSetupCoordination -coordinationQMgr coordination_qmgr_name -coordinationQMgrHost coordination_qmgr_host -coordinationQMgrPort coordination_qmgr_port -coordinationQMgrChannel coordination_qmgr_channel
For the created coordination_qmgr_name.mqsc, we will need to run the runmqsc command on the same machine that the coordination queue manager is running on. -
Create the command queue manager.
A command queue manager is a single queue manager which has been pre-configured so that the
IBM MQ infrastructure can route MFT requests to the relevant agent. Run the following
command:
fteSetupCommands -connectionQMgr Command QM Name -p Coordination QM Name
This creates a command.properties file in the coordination directory. Note that the -p is optional, and not required if the commands are being set up for the default coordination. Note: For TCP client connection to a queue manager, we can use:fteSetupCommands -p coordination_qmgr_name -commandQMgr connection_qmgr_name -commandQMgrHost connection_qmgr_host -commandQMgrPort connection_qmgr_port -commandQMgrChannel connection_qmgr_channel
- Create the agent. An agent is an application that can send and receive files. Run the following command:
fteCreateAgent -p coordination_qmgr_name -agentName agent_name -agentQMgr agent_qmgr_name
This creates the agent configuration under the coordination, and creates an IBM MQ script file to call agent_name.mqsc in the agent's configuration directory.Run the following IBM MQ command to load the IBM MQ script file into the queue manager:runmqsc agent_qmgr_name < agent_name_create.mqsc file
Note: For TCP client connection to a queue manager, we can use:fteCreateAgent -p coordination_qmgr_name -agentName agent_name -agentQMgr agent_qmgr_name -agentQMgrHost agent_qmgr_host -agentQMgrPort agent_qmgr_port -agentQMgrChannel agent_qmgr_channel
- Start the agent. Run the following command:
fteStartAgent -p coordination_qmgr_name agentName
The agent starts in the background, and the command prompt is returned. To check that the agent is running, run the following command:fteListAgents -p coordination_qmgr_name
This shows the status of the agents. If the agent is running successfully, it is reported as in the READY state.
Results
A basic MFT infrastructure is ready to use, and we can now use the fteCreateTransfer command to request a transfer. Alternatively if the IBM MQ Explorer is available, use the MFT plug-ins to create and monitor transfers.
More agents can be added to the configuration by repeating the Step 3: Create the agent. If the TCP client connection is used, these can be on different machines. For different machines the fteSetupCoordination and fteSetupCommands commands must be repeated for each machine, however the mqsc scripts would not need to be run.
More complex configurations can have separate queue managers for coordination and each agent. In these cases the various queue managers will need to be connected together.
Parent topic: Configure MFT for first useRelated information
- fteSetupCoordination
- fteSetupCommands: create the MFT command.properties file
- fteCreateAgent
- fteObfuscate: encrypt sensitive data
- MFT credentials file format
- The MFTagent.properties file
- What to do if your MFT agent is not listed by the fteListAgents command