Copy from Local zOS to Remote System (in Binary)
Copy from Local z/OS to Remote System (in Binary) via Universal Copy
The following figure illustrates the copying of a file from a local z/OS system to a remote system, in binary, with no end-of-line character interpretation.
//S1 EXEC UCMDPRC //UNVIN DD DISP=SHR,DSN=hlq.input.file //LOGONDD DD DISP=SHR,DSN=hlq.userid(userid) //SCRIPTDD DD * @echo off ucopy -output C:\OUTPUT.FILE //SYSIN DD * -script SCRIPTDD -encryptedfile LOGONDD -host dallas -stdin -mode binary /*
The JCL procedure UCMDPRC is used to execute the command. The command is sent to a remote system named dallas for execution. The -output option used with the ucopy command directs the stdout to a local data set on the remote server. The -mode option used with the ucopy command defaults to binary, so no end-of-line character interpretation is done. Binary is specified for standard input transfer mode.
Additional options are read from the encrypted file allocated to DD LOGONDD.
SYSIN Options
The SYSIN options used in this example are:
Option | Description |
---|---|
DD from which to read a script file. The script file is sent to the remote system for execution. | |
DD from which to read an encrypted command options file. | |
Directs the command to a computer with a host name of dallas. | |
Specification that the options following this one apply to the stdin file. | |
Specification for whether transferred data is treated as text or binary. |