15 pts.
 Sample of how to concatenate files to ftp to server
I need to be able to combine three files into one then ftp them to a remote server. Does anyone have an example?

Software/Hardware used:
ASKED: June 25, 2008  2:43 PM
UPDATED: July 14, 2008  9:20 AM

Answer Wiki:
A utility like <a href="http://www.winzip.com">WinZIP</a> or <a href="http://www.7-zip.org">7zip</a> can do this for you. This will compress the files into a single "container" file that can then be uploaded to an FTP server.
Last Wiki Answer Submitted:  June 25, 2008  2:53 pm  by  Labnuke99   32,645 pts.
All Answer Wiki Contributors:  Labnuke99   32,645 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hi,

You can just use “put” for the first file, then “append” for the other 2.

Regards,

Martin Gilbert.

 23,625 pts.

 

Another option – if the files are all in the same folder/directory, you can also do an “mput” or “mget” with wildcards.

Bob

 1,070 pts.

 

Bobkberg, I did the mget and it worked. However, now I am faced with this: the files are still separate, it does not concatenate them. So I am now wondering how to concat them once they are on our IBM mainframe. I can’t find a way to use a wildcard for the concat. I have tried to use a sort in the JCL with a wildcard but I cannot make that work. In this situation, I will never know each file name or how many there are. But the folder they are in on the ftp server will hold only those files and they will all have similar names, with a number appended, so wildcard would be great. Just can’t figure out how to make it work. Any suggestions? Please? Thank you very much for anything! BrookR

 15 pts.

 

Hi,
You could try making a small batch file to run on the PC to concatenate the files before you ftp them. Something like this :-

copy filea.*+fileb.*+filec.* ftpfile.txt

This should copy the 3 files to one file called ftpfile.txt which you can then ftp to your server.
I would make a batch file like this :-

copy filea.*+fileb.*+filec.* ftpfile.txt
(run your ftp script here to send ftpfile.txt to your server)
del /Q filea.*
del /Q fileb.*
del /Q filec.*
del /Q ftpfile.old
ren ftpfile.txt ftpfile.old

Then I keep a copy of the last concatenated file.

Regards,

Martin Gilbert.

 23,625 pts.

 

Hi,

You may need to add /B in the copy command to avoid the copy adding an end of file character.

Regards,

Martin Gilbert.

 23,625 pts.