Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.
Why does my protocol bridge agent write a file with the directory name appended to the start?
Ernest Bartosevic Published on 22/03/2018 / Updated on 30/07/2018
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:
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:
1
2
3
<tns:ftpServer name="myftpserver.domain.com" host=" myftpserver.domain.com " port="21" platform="windows"
timeZone="Europe/London" locale="en-GB" fileEncoding="UTF-8"
listFormat="UNIX" limitedWrite="false" passiveMode="true" />
Now let’s 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 “myftpserver.domain.com:tmp\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:
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: