Page 1 of 1

Need JCL for FTP

PostPosted: Mon Oct 19, 2009 12:39 pm
by nansriram
I need JCL for an FTP transfer.

Re: Need FTP JCL to upload files from PC to Mainframe host

PostPosted: Mon Oct 19, 2009 12:57 pm
by swd
I know you can do it from JCL on the mainframe, however I always do it from an FTP script on my Windows PC and either send stuff to the mainframe, or get stuff from the mainframe. I just find it easier.

If you're interested

FTP Batch file
@echo off
Ftp -s:"get.txt" YOUR.MAINFRAME.IP.ADDRESS
pause


and the get.txt file
TSO-USERID
PASSWORD
cd ..
ASCII
;BINARY
get USERID.DATASET.CNTL(DFSORT4) DFSORT4.JCL
quit


All very standard FTP stuff. It works for me.

Re: Need JCL for FTP

PostPosted: Mon Oct 19, 2009 3:19 pm
by MrSpock
See this previous topic for links to all the information that you'll need to know.

Re: Need JCL for FTP

PostPosted: Mon Oct 19, 2009 3:36 pm
by MrSpock
Please keep in mind that FTP is a client-server application, in that it requires one system to act as an FTP client and the other as an FTP server. If you're initiating the FTP on the mainframe, then your mainframe is the FTP client, and the other side is the FTP server, and must be configured as such. And, of course, your network definitions, firewalls, and access paths must exist and be properly setup in order for any of this to work.