Example: Transferring a single file to a single message
You can specify a queue as the destination of a file transfer by using the -dq parameter with the fteCreateTransfer command. The source file must be smaller than the maximum message length set on the destination queue. The destination queue does not have to be on the same queue manager as the queue manager that the destination agent connects to, but these two queue managers must be able to communicate.
About this task
The source file is called /tmp/single_record.txt and is located on the same system as the source agent, AGENT_NEPTUNE. The source agent, AGENT_NEPTUNE, uses the queue manager QM_NEPTUNE. The destination agent is AGENT_VENUS and this agent connects to the queue manager QM_VENUS. The destination queue, RECEIVING_QUEUE, is located on the queue manager QM_MERCURY. QM_MERCURY is in the same WebSphere® MQ network as, and can be accessed by, the queue manager QM_VENUS.
Procedure
fteCreateTransfer -sa AGENT_NEPTUNE -sm QM_NEPTUNE -da AGENT_VENUS -dm QM_VENUS
-dq RECEIVING_QUEUE@QM_MERCURY /tmp/single_record.txt
If the destination queue is on a different queue manager to the queue manager used by the destination agent you must specify the value of the -dq parameter in the following format queue_name@queue_manager_name. If you do not specify @queue_manager_name in the value, the destination agent assumes that the destination queue is located on its own queue manager.
The source agent, AGENT_NEPTUNE, reads the data from the file /tmp/single_record.txt and transfers this data to the destination agent, AGENT_VENUS. The destination agent, AGENT_VENUS, sends the data to a persistent message on the queue RECEIVING_QUEUE@QM_MERCURY. The message does not have a WebSphere MQ group ID set.