Third-Party Copy via Local zOS, from UNIX to Windows

Third-Party Copy via Local z/OS, from UNIX to Windows via Universal Copy

The following figure illustrates the third-party copying of a file from a local z/OS system, which executes a ucopy from UNIX to Windows.

//S1 EXEC UCMDPRC
//UNVIN    DD DSN=hlq.userid(#useridnt),DISP=SHR
//LOGONDD  DD DSN=hlq.userid(#useridunx),DISP=SHR
//SCRIPT   DD *
export UCMDPATH=/opt/universal/bin     
export UCPYPATH=/opt/universal/bin     
export OUTPUTFILE="c:\temp\outputfile"    
export INPUTFILE=/tmp/inputfile     
export NTHOST=nthostname       
export TEMPNTID=/tmp/tempntid        
export MODE=text       
$UCPYPATH/ucopy -output $TEMPNTID      
$UCMDPATH/ucmd \        
-cmd "ucopy -output $OUTPUTFILE"< $INPUTFILE \    
-host $NTHOST -encryptedfile $TEMPNTID -level info -stdin -mode $MODE   
rc=$?              
rm $TEMPNTID         
exit $rc       
//SYSIN    DD *       
-script SCRIPT      
-encryptedfile LOGONDD       
-host unixhostname    
-level info       
/*       


All error messages will be routed to the z/OS manager. The authentication information for the NT 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 Windows server

UCOPYPATH

Path to UNIX ucopy executable

UCMDPATH

Path to UNIX ucmd executable

OUTPUTFILE

Path and filename of receiving file

INPUTFILE

Path and file name of sending file

NTHOST

IP address or hostname of receiving Windows server

TEMPNTID

Temporary file on the UNIX server used to house the encrypted logon information for the Windows server.

MODE

Mode of file transfer (binary / text). Default is set to text.

SYSIN Options

The SYSIN options used in this example are:


Option

Description

-script

DD from which to read a script file. The script file is sent to the remote system for execution.

-encryptedfile

DD from which to read an encrypted command options file.

-host

Directs the command to a computer with a host name of unixhostname.

-level

Sets the level of message information.

Components

Universal Command Manager for z/OS

Universal Command Manager for UNIX

Universal Command Server for Windows

Universal Copy