It has been noticed by the IBM Support team that a number of IBM MQ Managed File Transfer (MFT) customers using a Protocol Bridge Agent (PBA) to transfer files to a file server have not set the listFormat attribute in the ProtocolBridgeProperties.xml file. The use of this attribute is detailed in the IBM Knowledge Centre (KC). However there still seems to be a common misunderstanding on what to set this attribute to. This blog post will describe how and why the listFormat attribute should be configured. Moreover, I will explain what issues can arise if it wasn’t configured properly.

So, according to the IBM KC listFormat is an optional attribute that applies to FTP and FTPS servers only. Here is the exact description from KC:

  • Optional. The listing format that defines the format of the file-listed information that is returned from the protocol file server. Use either Windows or UNIX. The default is UNIX.

What does this mean to the user? This means that according to the type of shell used by the file server (MS-DOS/Cygwin/UNIX) MFT will use appropriate file delimiters that would match it.

For instance, having set the listFormat attribute to UNIX on a Windows file server that uses Cygwin/UNIX shell for file listing, would not cause any issues. When the PBA issues a LIST command to the file server, the file server returns the file listing in a UNIX format which the PBA then parses successfully. However, if the file server is Windows and it is using the Windows default shell (MS-DOS) for the file listing, then setting the list format to UNIX can cause a number an issues with the file transfer.

Here is an example that shows this. Suppose we have the following:

<tns:ftpServer name="" host=" " port="21" platform="windows" 
                timeZone="Europe/London" locale="en-GB" fileEncoding="UTF-8"
                listFormat="UNIX" limitedWrite="false" passiveMode="true" />

Now lets imagine the file server is running on Windows and it is using the default MS-DOS shell.

The PBA receives a file transfer request containing the following destination file “\destinationDir\test.txt”. Because the MFT PBA agent thinks that the file server is using a UNIX type a shell it will change the file delimiter. As a result of this, the user will end up with one the two outcomes detailed below:

  • A destination file located in the “/tmp” directory with a file “desintationDir/test.txt”
  • A file transfer that has been marked as successful, but the file is not on the file server

Note that having the listFormat attribute set to the incorrect value will also have an effect on the managed file transfers where the PBA agent is the source agent, as the transfers will fail with the following error message:

  • BFGIO0110E: File “/tmp/destinationDir/destination.txt” does not exist. This might happen because the PBA agent will search the directory “/tmp” for a file called “destinationDir/destination.txt”

Join The Discussion

Your email address will not be published.