Example: Transferring a group of messages from a queue to a single file
We can specify a single complete group on an IBM MQ queue as the source of a file transfer by using the -sq and -sqgi parameters with the fteCreateTransfer command.
About this task
In this example, there are ten messages on the queue START_QUEUE. This queue must be on the source agent's queue manager, QM_NEPTUNE. The first three messages belong to a group with the IBM MQ group ID 41424b3ef3a2202020202020202020202020202020201111; this group is not a complete group. The next five messages belong to a group with the IBM MQ group ID 41424b3ef3a2202020202020202020202020202020202222; this group is complete. The remaining two messages belong to a group with the IBM MQ group ID 41424b3ef3a2202020202020202020202020202020203333; this group is complete.
Procedure
Type the following command:
fteCreateTransfer -sa AGENT_NEPTUNE -sm QM_NEPTUNE -da AGENT_VENUS
-df /out/group.txt -sqgi -sq START_QUEUE
The
data in the messages belonging to the first complete group on the queue
START_QUEUE, the group with IBM MQ group ID 41424b3ef3a2202020202020202020202020202020202222, is written to the file
/out/group.txt on the system where AGENT_VENUS is
running.
Parent topic: Transfer data from messages to files
Related concepts
Related tasks
- Configure an agent to perform message-to-file transfers
- Example: Transferring from a queue to a single file
- Example: Inserting a text delimiter before the data from each message
- Example: Inserting a binary delimiter after the data from each message
- Monitor a queue and using variable substitution
- Example: Failing a message-to-file transfer using IBM MQ message properties
Related information