Example: Inserting a text delimiter before the data from each message
When we are transferring in text mode from a source queue to a file, we can specify that a text delimiter is inserted before the data from individual messages by using the -sq, -sqdt and -sqdp parameters with the fteCreateTransfer command.
In this example, there are four messages on the queue START_QUEUE. This queue is on the source agent's queue manager, QM_NEPTUNE. The text delimiter to be inserted before the data from each message can be expressed as a Java literal string, for example: \n\u002D\u002D\u002D\n.
Procedure
Type the following command:fteCreateTransfer -sa AGENT_NEPTUNE -sm QM_NEPTUNE -da AGENT_VENUS -df /out/output.txt -t text -sqdt "\n\u002D\u002D\u002D\n" -sqdp prefix -sq START_QUEUEThe text delimiter is added to the beginning of the data from each of the four messages on START_QUEUE by the source agent, AGENT_NEPTUNE. This data is written to the destination file, /out/output.txt. 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: Transferring a group of messages from a queue to a single file
- 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