FlentFTP GetListing doesn't work for z/OS (MVS) datasets
FTP OS: Windows 10
FTP Server: IBM z/OS FTP
foreach (FtpListItem item in client.GetListing("'SPTUSER.'",FtpListOption.ForceList))
Always returns:
Qualifier too long. Use MVS naming conventions.
Trying to list datasets prefix SPTUSER.**
I cannot understand the issue from the short sentences you've written. Can you explain at length?
Also please check if it works in Filezilla Client. If it works there, then paste the Filezilla logs and FluentFTP logs for us to compare.
Thanks.
z/OS supports both non-unix (IBM) and unix file structures. Most mainframe users still use the IBM file system structures which consists of partitioned datasets with members (PDS,PDSE), sequential files, VSAM files and other architectures which are IBM proprietary, coming way back from the early 1960s when IBM launched the IBM 360 machine series. These architectures are alive and kicking and I would suggest that 99% of mainframe users use these files over the UNIX file system that IBM also supports on today’s z/OS. With FileZilla I can access either the zos non-unix files or the unix files. The switch appears to be how I specify the remove directory. For argument sake, if my userid is SPTHOLT and I specify no remote directory the IBM FTP Server will return a listing from the non-unix side, with all the datasets catalogued as SPTHOLT.**. If I provide a remote directory in the FileZilla client of /usr/edholt/ that will force the FTP server to list all the files in the UNIX directory under /usr/edholt/.
With FileZilla I can get a listing from both non-unix and unix file structures. I have attached a filleZilla Log
Can you tell me how to do the FluentFTP log?
Check the FAQ it has a section on logging. Also, can you try with Filezilla Client and if you're successful then please paste/attach those logs as well so we can compare the behaviour.
When you respond I will reopen this.
I have some input in this regard. The IBM z/OS operating system's FTP server has a number of extensions beyond typical Win/Linux/Unix FTP servers. These include a substantially large set of platform-specific meta data sent to/from the server, e.g. Character set conversions, multiple file system formats, multiple file types not directly compatible off-mainframe. This includes, conversion from fixed-block (implied line endings base on "record length"), and variable line lengths based on nnDATA layouts where nn specifies the length of the line. Much of this is handled by the z/OS server but it requires the FTP client to specify requests and SITE settings that are server specific. We would propose a design that offers simple server-specific methods designed to hide these complexities from the caller.
Beyond having two file systems, the z/OS operating system also has an input/output spooling mechanism which basically amounts to yet another file system. Those subsystems are used to submit tasks to the mainframe for background execution and to retrieve the various outputs that are spooled by the background task in response.
Finally, the z/OS server responds in ways the non-mainframe clients do not anticipate causing generalized FTP clients to show incomplete responses.
I noticed your reference to FileZilla in this regard. It does interface to z/OS but it's not complete. Comparing your logs to theirs will not really provide enough information. Comparing logs will show what was different but not why. Nor will you be able to decide how to address the problem. For example, do we add capabilities to the request, or receive side? Do we handle character conversions in the client, or trust the server? The best way to do this is from the ground up. Begin by reviewing the IBM extensions and decide how to implement/address each one in the client. Then it's code, test, debug and resolve as you go.
With that said...
We have some interest in using your project in an open source initiative aimed at IBM mainframe to non-mainframe integration, specifically DevOps. A cursory review of your repo shows that a significant number of server-specific features will have to be designed and coded, along with appropriate unit and integrations tests. If we were to perform this work and offer it back to you in the form of a pull request, would you be interested? Alternatively, we would fork and build something specific to the IBM platform. Our work would be the same either way, allowing us to easily merge your updates to our fork. The MIT license rules in both cases.
If you want us to work under your umbrella, the next steps would be for us to perform a more detailed review and compose a plan of action. Our goal is to add the new z/OS features while avoiding breaking-changes for existing deployments.
I have a similar issue on a zOS server. The LIST command always returns with an empty list, but only when using the DATASET file system, it works fine when using Unix file system. Other commands like CWD work just fine. I'll open an issue as this one appears to be closed.
@robinrodricks
I am having the same issue. I suspect the issue to be coming from
FtpClient_FileUpload.cs - Line 91 var remotePath = remoteDir + fileName;
Line 68 remoteDir = !remoteDir.EndsWith("/") ? remoteDir + "/" : remoteDir;
remotePath is generating the following: 'DEVAR.'/AAAM.ivg where remoteDir is 'DEVAR.'/ and filename is AAAM.ivg The expected file path should look like this 'DEVAR.AAAM.ivg'
The issue is the mandatory slash being added which is not allowed in zOS so a conditional will be needed. And the single quote needs to be moved to the end.
I am currently working on a flag/conditional that will work hopefully and will submit a request.