unixmainframezos

Download a binary file from a z/OS UNIX System Services (USS) file system


I have a file in UTF-8 encoding with a certificate on z/OS in a UNIX file system and I would like to download it using a secure protocol.

I tried to download it using scp but the encoding has been automatically converted and the file was not readable.

How can I download the file as binary without changing the encoding?


Solution

  • I use Zowe CLI to download/upload from z/OS:

    zowe zos-files download uss-file <path-to-your-file> --binary
    

    Alternatively, you can choose your local file name:

    zowe zos-files download uss-file <path-to-your-file> --binary --file yourFile.bin
    

    Upload via:

    zowe files upload file-to-uss yourFile.bin "<path-to-your-file>/yourFile.bin” --binary