FTP Multiple files



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

FTP Multiple files

Postby Prasanna G » Fri Aug 07, 2015 8:10 am

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.
User avatar
Prasanna G
 
Posts: 71
Joined: Tue Apr 12, 2011 9:49 pm
Has thanked: 1 time
Been thanked: 0 time

Re: FTP Multiple files

Postby steve-myers » Fri Aug 07, 2015 8:48 am

Is the (I presume) FTP client running on a workstation, in a TSO session, or as a batch job?
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: FTP Multiple files

Postby Prasanna G » Fri Aug 07, 2015 10:48 am

The source (both the configuration file and the files mentioned in the configuration file) is in mainframes and the destination is a Linux box.
User avatar
Prasanna G
 
Posts: 71
Joined: Tue Apr 12, 2011 9:49 pm
Has thanked: 1 time
Been thanked: 0 time

Re: FTP Multiple files

Postby Robert Sample » Fri Aug 07, 2015 5:48 pm

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.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: FTP Multiple files

Postby steve-myers » Fri Aug 07, 2015 6:43 pm

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: FTP Multiple files

Postby Pedro » Fri Aug 07, 2015 9:30 pm

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.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: FTP Multiple files

Postby Pedro » Fri Aug 07, 2015 9:45 pm

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.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post