Answer

FTP, JCL to append several files simultaneously

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?

Requires Free Membership to View

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.

This was first published in November 2008

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: