Transfer request examples
Examples of the messages that you can put on the agent command queue to request that the agent create or cancel a transfer.
Create transfer request
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
version="4.00"
xsi:noNamespaceSchemaLocation="FileTransfer.xsd">
<managedTransfer>
<originator>
<hostName>example.com.</hostName>
<userID>mqm</userID>
</originator>
<sourceAgent QMgr="QM_JUPITER" agent="AGENT_JUPITER"/>
<destinationAgent QMgr="QM_JUPITER" agent="AGENT_JUPITER"/>
<transferSet>
<item checksumMethod="MD5" mode="binary">
<source disposition="leave" recursive="false">
<file>/etc/passwd</file>
</source>
<destination exist="overwrite" type="directory">
<file>/tmp</file>
</destination>
</item>
</transferSet>
</managedTransfer>
</request>
Create transfer request - transfer to IBM 4690
In this example XML, the file xyz.txt is set to mirrored on close when transferred to the directory c:\adx_test on a IBM® 4690 store controller.
<?xml version="1.0" encoding="UTF-8"?>
<request version="5.00"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="FileTransfer.xsd">
<managedTransfer>
<originator>
<hostName>example.com.</hostName><userID>bob</userID>
</originator>
<sourceAgent agent="AGENT_A" QMgr="qm_a"/>
<destinationAgent agent="AGENT_B" QMgr="qm_b"/>
<transferSet>
<item mode="binary" checksumMethod="MD5">
<source recursive="false" disposition="leave">
<file>xyz.txt</file>
</source>
<destination type="directory" exist="error">
<file>c:\adx_test</file>
<attributes>
<attribute>DIST(MIRRORED,CLOSE)</attribute>
</attributes>
</destination>
</item>
</transferSet>
</managedTransfer>
</request>
For more information about distribution type
attributes for IBM MQ Managed File Transfer on IBM 4690, see File distribution attributes.Create transfer request - synchronous
When a user requests a blocking synchronous request,
that is, they wait for the transfer to complete and receive status
messages, the message placed on the command queue contains a reply
element that specifies the queue that a reply message is sent to.
The following example shows the message placed on the command queue
used by FTEAGENT:
<?xml version="1.0" encoding="UTF-8"?>
<request version="4.00"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="FileTransfer.xsd">
<managedTransfer>
<originator>
<hostName>reportserver.com</hostName>
<userID>USER1</userID>
</originator>
<sourceAgent agent="FTEAGENT"
QMgr="QM1"/>
<destinationAgent agent="AGENT2"
QMgr="QM2"/>
<reply QMGR="QM1">WMQFTE.492D0D5502770020</reply>
<transferSet>
<item mode="binary" checksumMethod="MD5">
<source recursive="false" disposition="leave">
<file>c:\sourcefiles\source1.doc</file>
</source>
<destination type="file" exist="overwrite">
<file>c:\destinationfiles\dest1.doc</file>
</destination>
</item>
</transferSet>
</managedTransfer>
</request>
The <reply> element is populated with the name of the
command queue manager where a temporary dynamic queue has been created
to receive reply about the successful (or otherwise) completion of
the transfer. The name of the temporary dynamic queue is composed
of two parts:- The prefix as defined by the key dynamicQueuePrefix in the command.properties configuration file (it is WMQFTE. by default)
- The ID of the queue as generated by IBM MQ
Cancel transfer request
<?xml version="1.0" encoding="UTF-8"?>
<cancel xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
version="4.00"
xsi:noNamespaceSchemaLocation="FileTransfer.xsd">
<originator>
<hostName>example.com.</hostName>
<userID>mqm</userID>
</originator>
<transfer>414D51205553322E42494E44494E47538B0F404D032C0020</transfer>
<reply QMGR="QM_JUPITER">WMQFTE.4D400F8B20002007</reply>
</cancel>