I'm connecting your stuff to an IBM mainframe. I've uncovered some significant wrinkles, which I fixed, but thought you should know about.
A brief primer on mainframe FTP follows:
IBM has a task named OMVS for entering their bastard Unix. They hacked it up from the Mortice Kern toolkit back in the 80s. It's amazing ugly, but it sort of works.
In my world, WebSphere, everything must run in a UNIX file system. This is supported by something called Unix System Services, (USS).
Unix System Services, for all practical purposes, is the only place where the current enterprisedt packages will work. WebSphere and Java live in USS.
When an FTPClient reaches into an IBM mainframe, it does not go directly to the USS file system. It reaches the MVS file system. This is what you get when you first connect:
dir
>>> PORT 127,0,0,1,10,246
200 Port request OK.
>>> LIST
125 List started OK
Volume Unit Referred Ext Used Recfm Lrecl BlkSz Dsorg Dsname
DOXT02 3390 2005/07/12 1 30 U 0 0 PO HFS.PLEX40
SHRT27 3390 2005/06/17 1 1 FB 80 9040 PO TSYS.ISPPROF
250 List completed successfully.
Since Java never operates against this file system, it's pointless to build a FileParser for it, though it would be trivial to implement. The first thing the FTPClient should do is get into the USS file system:
cd /u/isdxnqq
>>> CWD /u/isdxnqq
250 HFS directory /u/isdxnqq is the current working directory
Now, there's another obstacle to overcome: the following code fragment illustrates what will NOT work.
sDirList = ftp.dir(".", true);
This is what the doctor ordered.
An ugly little hack to
public String[] dir(String dirname, boolean full)
// send the retrieve command
// String command = full ? "LIST ":"NLST ";
String command = full ? "NLST -l ":"NLST ";
And a change to the calling code:
// OMVS is very very stupid, NLST -l doesn't take an arg
sDirList = ftp.dir("", true);
Thereafter, the UnixFileParser works fine.
Command:
dir
>>> PORT 127,0,0,1,12,25
200 Port request OK.
>>> LIST
125 List started OK
total 80
-rwxr-xr-x 1 ISDXNQQ PDDOEGRP 686 Jun 20 17:40 BlazeMoveMF.class
-rwxr-xr-x 1 ISDXNQQ PDDOEGRP 352 Jun 20 17:19 BlazeMoveMF.java
-rwxr-xr-x 1 ISDXNQQ PDDOEGRP 425 Jun 20 17:40 HelloWorld.class
-rwxr-xr-x 1 ISDXNQQ PDDOEGRP 229 Jun 20 17:40 HelloWorld.java
-rwxr-xr-x 1 ISDXNQQ PDDOEGRP 29 Jun 20 17:08 cdwork.sh
drwxr-xr-x 3 ISDXNQQ PDDOEGRP 8192 Jun 17 20:49 com
-rwxr-xr-x 1 ISDXNQQ PDDOEGRP 1240 Jun 20 17:14 runit.sh
-rwxr-xr-x 1 ISDXNQQ PDDOEGRP 2923 Jun 17 20:50 set.out
-rwxr-xr-x 1 ISDXNQQ PDDOEGRP 1199 Jun 17 21:23 setclass.sh
250 List completed successfully.
Now, it's your code base, but I've got some ideas and suggestions about how OVMS/USS could be factored in. IBM is jumping into Java in a huge way, they've now got dedicated hardware called zAPP for dedicated Java processing. FTP is really the only good way in and out of that space.
FYI IBM's ftpd commands
Command:
help
User-FTP understands these commands:
! ? acct append ascii big5 binary
block ccc cd cdup clear close compress
cprotect debug delete delimit dir dump ebcdic
euckanji feature file get glob hangeul help
ibmkanji jis78kj jis83kj ksc5601 language lcd lmkdir
locsite locstat lpwd ls mdelete mget mkdir
mode mput noop open pass private prompt
protect proxy put pwd quit quote record
rename restart rmdir safe schinese sendport sendsite
site sjiskanji srestart status stream structure sunique
system tchinese tso type ucs2 user verbose
Specify a command by any unambiguous prefix
Specify a local data set by qualifier.qualifier... with optional
member as (member). Enclose fully qualified names in quotes
For information about a particular command, say 'HELP command'
Command:
Regards,
Dan Weese
danweese@gmail.com