Hello,
This jcl can be used for send or receive (just change "get" or "put" as needed).
//FTP1 EXEC PGM=FTP,PARM='(TIMEOUT 720'
//OUTPUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//INPUT DD *
Ip address
userid
password
CD path
get server file name 'mainframe file name'
QUIT
//FTPSTEP EXEC PGM=FTP,PARM='EXIT'
//SYSUT1 DD DISP=SHR,DSN=DATASET.TO.SEND
//NETRC DD DISP=SHR,DSN=TCPIP.NETRC.DATASET
//OUTPUT DD SYSOUT=*
//INPUT DD *
ip_address or server_name
userid and password (optional if specified in NETRC)
sendsite
ascii
cd server_directory
put //DD:SYSUT1 filename.ext
qui
/*
If you are trying to get/put from a desktop, you will probably not be able to use ftp jcl to do this - desktops typically only run an ftp client and for what you want this will not work. Many win-based servers also do not run an ftp daemon/service.
In addition to having a remote server that will always be "up" (if not your job will fail and you will need to deal with unsuccessfult transmissions), you need to have proper permissions on the remote server. If there are transmission or connection problems, you will need to talk with the remote system admin and/or the network admins at either/both ends.