We are in the process of replacing all our FTP with SFTP. One snag: some of the regular FTP jobs use (and require) the sunique option. That option makes the FTP client use the STOU instead of the STOR verb to upload a file. The FTP server, when it detects the file-to-upload already exists, will then append a .1 (.2, .3...) to the filename in order to avoid overwriting the already-there file on the server.
I did not find an equivalent option on the SFTP client. Is there one? How can I get the same behaviour using the czsftp command?
Thanks and very best regards,
Jantje.
sunique/STOU equivalent?
Re: sunique/STOU equivalent?
Please clarify: is z/OS the client or the server in this scenario?
- if z/OS is the client, then this feature would require something in the SSH/SFTP protocol that does not exist. We wouldn't be able to address that with non z/OS sftp servers.
- if z/OS is the server: there is not currently a matching feature in the sftp protocol or in Co:Z SFTP server.
There is a "noreplace" option in Co:Z SFTP, but this only prevents replacing an existing data set.
It would be possible to add support for z/OS system symbols in z/OS target dataset names, so that a remote client could do something like:
sftp> put localfile //HLQ.DATA.D&LYYMMDD.T&LHHMMSS
>>>> Would a new feature like this meet anyone's requirements for something like this?
- if z/OS is the client, then this feature would require something in the SSH/SFTP protocol that does not exist. We wouldn't be able to address that with non z/OS sftp servers.
- if z/OS is the server: there is not currently a matching feature in the sftp protocol or in Co:Z SFTP server.
There is a "noreplace" option in Co:Z SFTP, but this only prevents replacing an existing data set.
It would be possible to add support for z/OS system symbols in z/OS target dataset names, so that a remote client could do something like:
sftp> put localfile //HLQ.DATA.D&LYYMMDD.T&LHHMMSS
>>>> Would a new feature like this meet anyone's requirements for something like this?
-
- Posts: 2
- Joined: Mon May 14, 2018 10:16 am
Re: sunique/STOU equivalent?
In my scenario, z/OS is the client.
You confirm the equivalent of STOU does not exist in SFTP. I feared already as much...
Obviously, if this were a greenfield development, I could get away with a different scheme and clearly, system symbols could help, but unfortunately, this is not my case...
You confirm the equivalent of STOU does not exist in SFTP. I feared already as much...
Obviously, if this were a greenfield development, I could get away with a different scheme and clearly, system symbols could help, but unfortunately, this is not my case...