We're using edtFTPj/PRO 3.1.2 to transfer files between Unix and z/OS (app running on Unix). Protocol is passive mode FTPS.
To connect, we issue the following calls (client is an instance of SecureFileTransferClient):
client.setProtocol( Protocol.FTPS_EXPLICIT);
client.getAdvancedFTPSettings().setRetryCount( 0);
client.setEventListener( new EventLogger());
client.setContentType( FTPTransferType.ASCII);
client.getAdvancedFTPSettings().setConnectMode( FTPConnectMode.PASV);
client.connect();
Immediately afterwards we were issuing the site command:
client.executeCommand( "site lrecl=9 blksize=27990 recfm=fb");
and then uploading a file.
The problem is that sometimes (not consistently for a single host and across multiple hosts) the uploaded file is not formatted according to the parameters of the site command. The log didn't help; both the site command and the file upload completed successfully. The uploaded file is fairly small. We also tried issuing the site command immediately after the connection was opened as well as immediately before the upload.
I suspect what's happening is the site command and the upload command are sometimes being passed in different connections, causing the upload to save the file in the wrong format, but I can't prove it. The reason I suspect this is that originally we had the site command broken into three calls to executeCommand(). On occasion the second or third command would fail, as if the first command had never been issued. The only reason I can think of for such a failure would be if the commands were executed on different connections/threads.
Can anyone shed light on this? Thanks.
Bob