开发者

Commons VFS and IBM MVS System

I'm using Apache Commons VFS / SFTP, we are trying to download files from the IBM MVS system.

The download part is all good, however, we can not open up the zipped files after downloading. Seems like the zip file was compressed using a different algorithm or something

Anyone has any pointers?

*Note, the same function works fine if we connect to a regular unix/linux SFTP server.

Below is an example of what we did

                    String defaultHost = "[my sftp ip address]";
                    String host = defaultHost;
                    String defaultRemotePath = "//__root.dir1.dir2.";
                    String remotePath = defaultRemotePath;
                    String user = "test";
                    String password = "test";
                    String remoteFileName = "Blah.ZIP.BLAH";

                    log.info("FtpPojo() begin instantiation");
                    FileObject localFileObject = fsManager.resolveFile("C:/Work/Blah.ZIP.BLAH");
                    log.debug("local file name is :"+localFileObject.getName().getBaseName());
                    log.debug("FtpPojo() instantiated and fsManager created");

                    String uri = createSftpUri(host, user, password) + ":322"+remotePath+remoteFileName;
                    remoteRepo = fsManager.resolveFile(uri, fsOptions);
             开发者_Python百科       remoteRepo.copyFrom(localFileObject, Selectors.SELECT_ALL);


I am not a mainframe expert but I assume you connect not to MVS but to the USS (Unix System Services) which run either FTP or SSH daemon. I only tried to download files via FTP from USS with a regular Windows FTP could exchange and open the files fine. No binary thouhg. Thus, I do not assume that you would get files in EBCDIC encoding.

Have you tried downloading a simple text file? Have you tried downloading a text file with special characters? e.g. German umlauts or other non-ASCII?


A couple things to try:

specify the BINARY option as I think the default is EBCDIC-ASCII translation. This will do horrible things to a zip file. If you can download a plain text file that may be your trouble.

Could the zipped data be something your system doesn't like such as a PDS?

have a read of this page http://www.cbttape.org/downloadtrouble.htm

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜