Third-Party Copy via Local z/OS, from Windows to UNIX
Third-Party Copy via Local z/OS, from Windows to UNIX via Universal Copy
The following figure illustrates the third-party copying of a file from a local z/OS system, which executes a ucopy command from Windows to UNIX.
//S1 EXEC UCMDPRC
//UNVIN DD DSN=hlq.userid(#useridunx),DISP=SHR
//LOGONDD DD DSN=hlq.userid(#useridnt),DISP=SHR
//SCRIPT DD *
@ECHO ON
:: TRANSFER FROM NT to UNIX
@SET UCOPYPATH=/opt/universal/bin/
@SET OUTPUTFILE=outputfile
@SET INPUTFILE=inputfile
@SET UNIXHOST=unixhost
@SET TEMPUNIXID=c:\temp\tempunixid
@SET MODE=text
ucopy -output %TEMPUNIXID%
ucmd¬
-cmd " %UCOPYPATH%ucopy -output %OUTPUTFILE%"¬
< %INPUTFILE% -host %UNIXHOST% -encryptedfile %TEMPUNIXID%¬
-level info -stdin -mode %MODE%
SET RC=%ERRORLEVEL%
del %TEMPUNIXID%
URC %RC%
//SYSIN DD *
-script SCRIPT
-encryptedfile LOGONDD
-host NTHOST
-level info
/*
All informational messages will be routed to the z/OS manager. The authentication information for the UNIX server must reside on the z/OS.
The file is copied as a text file, since the default transfer mode for standard files is text.
Parameters
The following parameters should be changed to match your information:
Parameter | Description |
|---|---|
#USERIDUNX | Encrypted userid and password member for UNIX server |
#USERIDNT | Encrypted userid and password member for NT server |
UCOPYPATH | Path to UCOPY on the receiving UNIX server |
OUTPUTFILE | Path and filename of receiving file on UNIX server |
INPUTFILE | Path and file name of sending file on Windows server |
UNIXHOST | IP address or hostname of receiving UNIX server |
NTHOST | IP address or hostname of sending Windows server |
TEMPUNIXID | Temporary file on the Windows server used to house the encrypted logon information for the UNIX server. This file is deleted at the bottom of the script. |
MODE | Mode of file transfer (binary/text). |
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 NTHOST. | |
Sets the level of message information. |
Components
Universal Command Manager for z/OS
Universal Command Manager for Windows