Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.7k views
in Java FTP by (300 points)
Hi,

I am using edtFTPj-free (ver 2.0.0) and JDK 1.4.2_08 to connect to an FTP server to upload files.

The FTP Server and system details are as below (as obtained from Windows FTP client):
ftp> open zosnq
Connected to zosnq.myplace.com.
220-IPFTPD1 IBM FTP CS V1R8 at ZOSNQ, 14:31:27 on 2008-01-24.
220 Connection will close if idle for more than 5 minutes.
User (zosnq.myplace.com:(none)): guest1
331 Send password please.
Password:
230 GUEST1 is logged on.  Working directory is "GUEST1.".
ftp> QUOTE SYST
215 MVS is the operating system of this server. FTP Server is running on z/OS.
ftp> pwd
257 "'GUEST1.'" is working directory.


I used the LS command to see if there are any files in the working directory.
One file was found to be there.

ftp> ls 'rxt.ibt.*'
200 Port request OK.
125 List started OK
'RXT.IBT.TEST.B00001.D0000001.ZIP.OUT'
250 List completed successfully.
ftp: 40 bytes received in 0.00Seconds 40000.00Kbytes/sec


I tried to use FileTransferClient class from EDT API to get the list of files in the working folder.
Both
fileTransferClient.directoryNameList();
and
fileTransferClient.directoryList();
return empty.

Questions:
1. Is MVS an unsupported OS? Does not EDT API support FTP servers on z/OS?
2. Do you intend to have an MVSParser to support this kind of a system?
3. If there is no current support, is there a recommendation as to how to develop a custom parser by the end-user-developer?

Any help towards answering these questions is greatly appreciated.

Thanks.

4 Answers

0 votes
by (162k points)
directoryNameList() should work ... can you post the DEBUG log?
0 votes
by (300 points)
Thanks for the prompt response.

I executed the following statements and got the DEBUG log.

String[] files = ftpClient.directoryNameList();
//Check the array

FTPFile[] ftpFiles = ftpClient.directoryList();
//Check the array

String result = ftpClient.executeCommand("LIST 'rxt.ibt.*'");
//print result

result = ftpClient.executeCommand("NLST 'rxt.ibt.*'");
//print result


The DEBUG log has been pasted below:
DEBUG [FTPClient] 24 Jan 2008 16:39:42.458 : Class: com.enterprisedt.net.ftp.FTPClient
Version: 2.0.0
Build timestamp: 20-Dec-2007 11:27:53 EST
Java version: 1.4.2_08
CLASSPATH: C:\VMFS\J2EE\RETI\lib\log4j.jar;C:\Documentum\Shared\dfcbase.jar;C:\Documentum\Shared\dfc.jar;C:\edtftpj-2.0.0\lib\edtftpj.jar
OS name: Windows XP
OS arch: x86
OS version: 5.1

DEBUG [FileTransferClient] 24 Jan 2008 16:39:42.677 : Configured client
DEBUG [FTPClient] 24 Jan 2008 16:39:42.677 : Connecting to ZOSNQ/xxx.xxx.xxx.xxx:21
DEBUG [SocketUtils] 24 Jan 2008 16:39:42.692 : Invoking connect with timeout=60000
DEBUG [SocketUtils] 24 Jan 2008 16:39:42.708 : Connected successfully
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:42.708 : 220-IPFTPD1 IBM FTP CS V1R8 at ZOSNQ, 16:39:43 on 2008-01-24.
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:42.848 : 220 Connection will close if idle for more than 5 minutes.
DEBUG [FileTransferClient] 24 Jan 2008 16:39:42.848 : Client connected
DEBUG [FileTransferClient] 24 Jan 2008 16:39:42.848 : Logging in
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:42.848 : ---> USER GUEST1
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:42.864 : 331 Send password please.
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:42.864 : ---> PASS ********
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.20 : 230 GUEST1 is logged on. Working directory is "GUEST1.".
DEBUG [FileTransferClient] 24 Jan 2008 16:39:43.20 : Logged in
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.20 : ---> TYPE I
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.20 : 200 Representation type is Image
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.20 : ---> PASV
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.36 : 227 Entering Passive Mode (x,x,x,x,15,99)
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.36 : Substituting server supplied IP (x.x.x.x) with remote host IP (x.x.x.x)
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.36 : ---> NLST
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.36 : 550 No data sets found.
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.67 : ---> SYST
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.83 : 215 MVS is the operating system of this server. FTP Server is running on z/OS.
WARN [FTPFileFactory] 24 Jan 2008 16:39:43.83 : Unknown SYST 'MVS is the operating system of this server. FTP Server is running on z/OS.' - defaulting to Unix parsing
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.83 : ---> PWD
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.83 : 257 "'GUEST1.'" is working directory.
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.83 : ---> PASV
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.98 : 227 Entering Passive Mode (x,x,x,x,15,100)
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.98 : Substituting server supplied IP (x.x.x.x) with remote host IP (x.x.x.x)
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.98 : ---> LIST
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.114 : 550 No data sets found.
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.114 : ---> LIST 'rxt.ibt.*'
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.130 : 125 List started OK
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.130 : ---> NLST 'rxt.ibt.*'
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.317 : 250 List completed successfully.
DEBUG [FTPControlSocket] 24 Jan 2008 16:39:43.317 : ---> QUIT

You could see that I had executed the LIST and NLST commands thru fileTransferclient and the results that I got was as below:
LIST -> Result: List started OK
NLST -> Result: List completed successfully.

Thanks.
0 votes
by (162k points)
Try directoryNameList(".") and directoryList(".", true)

If that doesn't work use "rxt.ibt.*" as the arg
0 votes
by (300 points)
Thanks again for the quick response.

String[] filesStrArray = ftpClient.directoryNameList("'rxt.ibt.*'", false);


made it work.

Categories

...