Home

 

mqftsnd (send file from server)

 

 

Purpose

The mqftsnd command is available with the File Transfer Application on WebSphere MQ for Windows, and WebSphere MQ for Linux (x86 platform) servers only.

Use the mqftsnd command to send a file from a WebSphere MQ server using the File Transfer Application.

 

Syntax


>>-mqftsnd-- -q --QueueName--+----------------+----------------->     '- -m --QMgrName-'    >--+----------------------+--+------+--+-----------------+------>    '- -t --TargetQMgrName-' '- -v -' '- -l --MsgLength-'       .- -p  yes---.     >--+------------+--+----------------+-- -f --FileName----------><    +- -p  no----+ '- -s --UserData-'        '- -p  queue-'    

 

Required parameters

-q QueueName

The local name of the destination queue.

-f FileName

The name of the file to be transmitted. The fully qualified file name can be specified. If the file name contains embedded spaces, it must be specified in double quotes. One file can be specified only, and we cannot use wildcard characters.

The file is not deleted from it's original location during a send.

 

Optional parameters

-m QMgrName

The name of the queue manager that has access to the file at it's origin. If you omit this parameter, the default queue manager is used.

-t TargetQMgrName

The name of the queue manager that hosts the destination queue. If you omit this parameter, the queue manager specified by QMgrName is used.

-v

Return the CorrelId of the file.

-l MessageSize

The maximum size of a segmented message in bytes.

If a file is too large to be sent as a single message, the file is segmented into a number smaller messages, known as segments, and all these segments are transmitted instead. When all the segments reach their destination, the target queue manager reassembles them to form the original file.

Specify a value between 250 and the queue manager's maximum message length. To determine the maximum message length, use the MQIA_MAX_MSG_LENGTH selector with the MQINQ call.

The default value is 100000.

-p yes

Messages are persistent. This is the default value.

-p no

Messages are not persistent.

-p queue

Messages persistence is defined by the queue.

-s UserData

An character string that contains user information relevant to the file being sent. The content of this data is of no significance to the target queue manager.

 

Return codes

0 Successful operation
36 Invalid arguments supplied
40 Queue manager not available
69 Storage not available
71 Unexpected error
163 Queue name required
164 Cannot open queue
165 Cannot open file
166 Cannot put to queue
167 No file name specified (Send)
168 Message length is too small to send data
169 Sending file has changed
170 Cannot get from queue
171 Cannot write to file
172 CorrelId is invalid
173 MsgId is invalid
174 No messages to receive
175 File for delete is not unique

 

Examples

This command sends a file from the default queue manager, to the queue DEST.Q, located on queue manager QM2:

mqftsnd -q DEST.Q -t QM2 -f "My document.txt"

This command sends a file as non-persistent messages from queue manager QM1, to the queue DEST.Q, located on the default queue manager, setting the maximum segment size to 50000 bytes:

mqftsnd -q DEST.Q -m QM1 -l 50000 -p no -f "C:\My Downloads\My document.idd"

 

Related commands

mqftapp Run File Transfer Application
mqftrcv Receive file on server
mqftrcvc Receive file on client
mqftsndc Send file from client

 

Parent topic:

The control commands


fa15850_


 

Home