Page 1 of 1

FTP Multiple files

PostPosted: Fri Aug 07, 2015 8:10 am
by Prasanna G
Hi

My requirement is to read a configuration flat file which will contain Mainframe file names, IP address of the destination, destination folder, destination file name.
I need to read the config file sequentially and transfer each of the mainframe file and FTP it to the particular IP address mentioned against the mainframe file.
Can someone let me know if it is feasible?

Thanks
Prasanna G.

Re: FTP Multiple files

PostPosted: Fri Aug 07, 2015 8:48 am
by steve-myers
Is the (I presume) FTP client running on a workstation, in a TSO session, or as a batch job?

Re: FTP Multiple files

PostPosted: Fri Aug 07, 2015 10:48 am
by Prasanna G
The source (both the configuration file and the files mentioned in the configuration file) is in mainframes and the destination is a Linux box.

Re: FTP Multiple files

PostPosted: Fri Aug 07, 2015 5:48 pm
by Robert Sample
It is feasible. For example, a Perl program could be used -- transfer the z/OS data set to a Unix System Services file, then use the Perl FTP interface to transfer the files. This is not the only way to accomplish this task on the mainframe.

However, whether or not it is feasible to do this AT YOUR SITE is an entirely different question that may have a different answer. Mainframe sites customize many things to meet their specific needs, so what is installed and working at one site may not be available at another site. You need to contact your site support group and work with them to determine whether or not what you want to do can be done at your site.

Re: FTP Multiple files

PostPosted: Fri Aug 07, 2015 6:43 pm
by steve-myers
TSO or batch?

The "configuration file" might as well be FTP control statements the TS/OP can use running FTP in batch:

OPEN url
userid
password
CD directory
PUT datasetname filename
CLOSE
OPEN next-url
userid
password
CD directory
PUT datasetname filename
CLOSE

or something like that.

Another possibility would be a Rexx script or a program to transform the "configuration file" to FTP commands.

As Mr. Sample says, the exact requirements depend on the local and remote systems. The general outline should be viable everywhere.

Re: FTP Multiple files

PostPosted: Fri Aug 07, 2015 9:30 pm
by Pedro
It is easier if the linux box has an FTP server. I am not familiar with linux... perhaps it is a given that it is running an FTP server, but most Windows systems do not run an FTP server.

I need to read the config file sequentially and transfer each ... file ... to the particular IP address

You were not specific enough... most people responding have assumed you are trying to automate this but your post did not state that. Do you know how to do this task manually? Show us how you would do it manually.

Re: FTP Multiple files

PostPosted: Fri Aug 07, 2015 9:45 pm
by Pedro
Steve Myers has outlined the commands needed. From rexx, the process I have seen is to QUEUE the responses to prompts and other FTP commands first and then finally to launch FTP.