We have SSH-based file transfer scripts currently set up for Linux-to-Linux and we're porting them to z/OS to go z/OS-to-Linux. Note that this is with USS, the UNIX system services within z/OS otherwise known as OMVS, which uses EBCDIC under the covers, not zLinux which uses ASCII.
We've set up all the SSH key files and what-not, and the transfer itself is working fine.
However z/OS, in it's infinite wisdom, insists on converting the files from EBCDIC to ASCII despite the fact that they're binary files - this is screwing up the content of the destination files.
The scp
manpage on z/OS states:
scp assumes that files are text. Files copied between EBCDIC and ASCII platforms are converted.
and I can find nothing useful in the manuals that indicates how to get around this.
It seems a bizarre limitation for anyone wanting to transfer binary files between the two platforms. Does anyone know of a way, using SSH-standard keyfiles (we need this for security, no naked FTP allowed), to effect a binary transfer without translation?
In essence, all files are transferred in "binary" mode, meaning that line endings are never changed.
Binary file transfer is a standard used to transmit data files through protocols of different telematic services, including Telefax Group 3 and 4, Teletex and Data Transfer and Manipulation (DTAM) normal mode.
You can use one of the other SSH-based tools such as sftp
.
Whereas scp
will let you transfer a file (with automatic authentication set up) with something like:
scp -i ident_file zos_file linux_user@linux_box:linux_file
you can do a similar thing with the secure FTP:
sftp IdentityFile=ident_file -b - linux_user@linux_box <<EOF
binary
put zos_file linux_file
EOF
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With