|
Well to write your own FTP client is not all that difficult. You must first understand all the requirements for FTP and the error messages. If all you want to do is connect, logon, list directory, get, put and close, you can write the FTP client to do this. It can take you upwards of 3 months. If you are all ready a TCP/IP sockets guru, maybe on 2 months. There are third party packages out their that do this for you. Two I can think of are ZMOD/400 and Alliance FTP manager. Each approach the problem with IBM's FTP client from different angles. Good Luck, Christopher K. Bipes Mailto:chrisb@cross-check.com Senior Programmer/Analyst Http://www.cross-check.com CrossCheck, Inc. 707 586-0551 x 1102 6119 State Farm Drive 707 586-1884 FAX Rohnert Park, CA 94928 ----- Original Message ----- From: "Alan Moulsdale" <alan.moulsdale@virgin.net> To: <MIDRANGE-L@midrange.com> Sent: Friday, October 13, 2000 2:07 AM Subject: Programming alternatives to the AS/400 FTP command. Hi guys, I am writing an AS/400 application for a client that needs to place data (customers and products etc) on their ISP. This data will then be downloaded from the ISP via a dialup connection to a database on a laptop computer (using FTP on their laptop). The data will then be processed on the laptop and another file (orders and changes) uploaded from the laptop to the ISP (again using FTP) from where the AS/400 will collect and process it. This will be done on many laptops. To avoid files being overwritten they will be in unique batches, and to avoid the AS/400 downloading files while they are still being written to, the PC will add a suffix to the batch after it has uploaded it. The AS/400 will only download batches with the correct suffix and then delete batches it has processed. The AS/400 will also leave an acknowledgement file so that the PC knows the batch has been process and can delete it itself. All in all quite a complicated comms handshake but it should be very effective. My problem occurs with the AS/400 FTP command. This is a very clumsy way of doing things. At the moment my design is for the AS/400 to write out the FTP commands required (open, user, put, get, close etc.) to a source member at run time and then use this member as the input for the FTP command. The FTP command will output to an error member which my program will read after the completion of the FTP command. If there were any errors the program can the write a new FTP member to retry them etc. What I want to know (finally!) is if there is a smarter way of doing this? Can I, for instance, in ILE RPG open a connection to an ISP and then put or get data, rename and delete files etc? This would hopefully give the feedback I require as each operation executes, so that I don't for example, delete a file that I have failed to get. Any ideas? Any examples? +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.