Example: Failing a message to file transfer using WebSphere MQ message properties
You can cause a message to file transfer to fail by setting the usr.UserReturnCode WebSphere® MQ message property to a non-zero value. You can also specify supplementary information about the reason for the failure by setting the usr.UserSupplement WebSphere MQ message property.
About this task
A user is creating messages and placing them on the queue INPUT_QUEUE. The source agent is consuming messages from the queue INPUT_QUEUE and is sending the transfer data to the destination agent. The destination agent is writing this data to the file /home/user/output.file.
The user writing messages to the queue INPUT_QUEUE wants to stop the transfer that is in progress and delete any data that has already been written to the destination file.