Example: Setting IBM MQ message properties on a file-to-message transfer
We can use the -qmp parameter on the fteCreateTransfer command to specify whether IBM MQ message properties are set on the first message written to the destination queue by the transfer. IBM MQ message properties allow an application to select messages to process, or to retrieve information about a message without accessing IBM MQ Message Descriptor (MQMD) or MQRFH2 headers.
Include the parameter -qmp true in the fteCreateTransfer command. In this example, the MQMD user ID of the user submitting the command is larmer.
Procedure
Type the following command:fteCreateTransfer -sa AGENT_JUPITER -da AGENT_SATURN -dq MY_QUEUE@MyQM -qmp true -t text /tmp/source_file.txtThe IBM MQ message properties of the first message written by the destination agent, AGENT_SATURN, to the queue, MY_QUEUE, on queue manager, MyQM, are set to these values:
usr.WMQFTETransferId=414cbaedefa234889d999a8ed09782395ea213ebbc9377cd usr.WMQFTETransferMode=text usr.WMQFTESourceAgent=AGENT_JUPITER usr.WMQFTEDestinationAgent=AGENT_SATURN usr.WMQFTEFileName=source_file.txt usr.WMQFTEFileSize=1024 usr.WMQFTEFileLastModified=1273740879040 usr.WMQFTEFileIndex=0 usr.WMQFTEMqmdUser=larmerParent topic: Transfer data from files to messages
Related concepts
Related tasks
- Configure an agent to perform file-to-message transfers
- Example: Transferring a single file to a single message
- Example: Splitting a single file into multiple messages by length
- Example: Splitting a text file with a regular expression delimiter and including the delimiter in the messages
- Example: Splitting a text file into multiple messages using a regular expression delimiter
- Example: Setting user-defined properties on a file-to-message transfer
- Starting a new file transfer
Related reference
Related information