On Sat, Aug 3, 2024, at 12:00 PM, Paul Gilmartin wrote:
> On Sat, 3 Aug 2024 16:35:05 +0000, Mark Jacobs wrote:
> 
> >Not directly but you might be able to leverage DSFS to do so.
> > 
> Don't know.  Where's the DSFS User's Guide?
> 
> Might one of the ISV products, Dovetailed or Rocket facilitate this?
> 
> (S)FTP was not designed for GUI or scripting.  It presumes human
> intelligence (AI?) to suss the content of the host's native directory listing.
> 

This is incorrect for SSH/SFTP.
The SSH/SFTP packet protocol has data structures for file names/attributes.   
These have both field encoded version and also a "longname" string that any 
filename / attributes format can be put into. 

See:  https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-02

>From "7. Responses from the Server to the Client" :


The SSH_FXP_NAME response has the following format:

        uint32     id
        uint32     count
        repeats count times:
                string     filename
                string     longname
                ATTRS      attrs

   where `id' is the request identifier, `count' is the number of names
   returned in this response, and the remaining fields repeat `count'
   times (so that all three fields are first included for the first
   file, then for the second file, etc).  In the repeated part,
   `filename' is a file name being returned (for SSH_FXP_READDIR, it
   will be a relative name within the directory, without any path
   components; for SSH_FXP_REALPATH it will be an absolute path name),
   `longname' is an expanded format for the file name, similar to what
   is returned by "ls -l" on Unix systems, and `attrs' is the attributes
   of the file as described in Section ``File Attributes''.

   The format of the `longname' field is unspecified by this protocol.
   It MUST be suitable for use in the output of a directory listing
   command (in fact, the recommended operation for a directory listing
   command is to simply display this data).  However, clients SHOULD NOT
   attempt to parse the longname field for file attributes; they SHOULD
   use the attrs field instead.

    The recommended format for the longname field is as follows:

        -rwxr-xr-x   1 mjos     staff      348911 Mar 25 14:29 t-filexfer
        1234567890 123 12345678 12345678 12345678 123456789012

===================================================================================

In Co:Z SFTP server, for data sets we populate the attrs fields as reasonably 
as we can and then we put an ISPF 3.4 style display of the dataset in the long 
filename string.    There's a setting to use a UNIX style long filename string 
for longname, since some SFTP GUIs parse that with UNIX expectations, even 
though this violates the "SHOULD NOT" warning above.


Kirk Wolf
Dovetailed Technologies
https://coztoolkit.com

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to