I would like to initiate one FTP from our 390 mainframe to get several files located in the same directory on a server. I would also like the data from each file appended into the final destination file, which resides on the mainframe. Is this possible?
Well, if you were running FTP client on a workstation and wanted several local files strung together as one file on the mainframe you could use APPE (append) instead of PUT on 2nd, 3rd, 4th ... files.
Since you want to initiate the transfer from 390 mainframe can you issue a mainframe REXEC or RSH to kick off the FTP client script on the workstation?
If you want to do it using FTP client on 390 mainframe and you do not want to do double work (FTP separate files then copy all to single file) you might consider using GDG's.
Suppose you had 4 files on workstation:
get work1.file my.gdg(0)
get work2.file my.gdg(0)
get work3.file my.gdg(0)
get work4.file my.gdg(0)
Now you can have JCL to refer to all 4 files as if they were a single dataset with:
//ALLFILES DD DISP=SHR,DSN=MY.GDG
Of course, that's not much different than FTP 4 files and just concatenating them in JCL when you need to process them all at once. In GDG and in concatenation approaches you can put file contents in any sequence you want.
If the 390 mainframe FTP client had a GET ... (APPEND command your problem would be solved. It does not appear to be a difficult enhancement but I'm sure IBM already has enough to do before they start extending FTP functionality too much.
Jim Keohane, Software Developer/Consultant, Multi-Platforms, Inc.
Dig deeper on Mainframe operating systems and management
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.