Page 1 of 1

XMIT Command

PostPosted: Wed Jul 02, 2008 4:01 am
by antu
Hello to all...

Can any one help me to write a JCL to xmit and receive data set...

Cheers!!!!!!!

Re: XMIT Command

PostPosted: Wed Jul 02, 2008 8:14 am
by dick scherrer
Hello antu and welcome to the forums,

Are you simply curious or do you have some files you want to send/recieve?

Dependng on what you have and what you want to do, the answers may vary.

Re: XMIT Command

PostPosted: Sat Jul 05, 2008 4:57 pm
by antu
Yes.... actually i want to write a JCL to xmit and receive datasets....

Re: XMIT Command

PostPosted: Sat Jul 05, 2008 10:35 pm
by dick scherrer
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.