Hey all,
For a recent customer, we needed to implement an MVS z/OS parser implementation that I'd like to contribute back. Additionally, I've found a few things out about the z/OS mainframe FTP that I'd like to share for people stumbling around with this:
a- Neither SIZE nor MDTM are supported by MVS z/OS.
b- Using LIST with a dot as an argument for the current directory (like in linux "LIST .") doesn't work at all on the mainframe.
c- Because of (a) and (b) above, the current code in FTPClient for the exists() method doesn't work. I've had to subclass FTPClient, and copy/paste the contents of the exists to make a single change. From dirDetails(".") to dirDetails(null) which works fine.
d- While it's true that adding a parser is possible (thank goodness), the current design doesn't easily lend itself to extensibility.
1- The only way to add a new parser in is to instance the FTPFileFactory yourself - fair enough, but your only constructor requires the system type so it can pick a parser. But you're trying to give it a new parser - it's a chicken-and-egg. And you'll always give the message that the system type is unrecognized and it's going to fall back to the UNIX parser, but then it will choose your specific parser thanks to the other logic.
2- Unfortunately, the setParser method in the FTPFileFactory is private, and hardcoded for just the auto-detection of the known ones. Then, after it decides to fall-back to UNIX format, it will still pass the rows around to see who could parse it. It would be better organized in my opinion if you could instance a FTPFileFactory, give it all the extra possible parsers, and either have the recognition done based on the declared system, or not use the system at all (just the format validation).
I'd love to contribute the MVSFileParser - how do you accept contributions?
Marc Batchelor
Pentaho Corporation
http://www.pentaho.com
[edited for spelling]