|
Hi Amir Khan, To initiate an automatic batch FTP transfer from an AS/400, first create a script in a source physical file containing valid FTP commands. To get it to work in batch (that is, without user input) when you run the FTP session, you must create a file override on a file called INPUT that tells the AS/400's FTP client where to retrieve the commands from (instead of from the keyboard, as it normally would). Thus, you override INPUT to point to your FTP script. If you want to capture the FTP session's results, you also must override a file called OUTPUT to a member where the session will be logged. For example, to transfer member HISMBR in file HISFILE in HISLIB from remote AS/400 HISAS400 to member MYMBR in file MYFILE in library MYLIB on MYAS400, use the following script, which I've named FTPCMDS in the source file FTPSRC on the AS/400 originating the FTP session (MYAS400): MYUSER PASSIT GET HISLIB/HISFILE.HISMBR MYLIB/MYFILE.MYMBR QUIT This script works for source file members. To use the script, start the FTP server on the remote system (HISAS400) with the command STRTCPSVR *FTP. Then, execute the following CL program on the source system (MYAS400): PGM OVRDBF FILE(INPUT) TOFILE(FTPSRC) MBR(FTPCMDS) CLRPFM FTPSRC/OUT OVRDBF FILE(OUTPUT) TOFILE(FTPSRC) MBR(OUT) FTP HISAS400 ENDPGM For this CL program to work, you must create a member called OUT in the FTPSRC file, which will contain the responses from the remote AS/400. Look in this member for any messages for debugging/error checking. Note that the user ID and password must be stored in the FTP command source member, so be sure to secure that member appropriately. Thanks, Murtuza Jadliwala System Analyst & Programmer System And Software SEEPZ, Mumbai India. > Hi, > > We are on OS/400 v4.5, Client Access v3.2 and I am > looking some kind of FTP > procedure to transfer AS/400 database file to PC. I > am trying to automate > the procedure (like a CL program) and run as an > option preferably from > AS/400. Any idea how to do it? > > (Sorry for addressing this question to RPG. Please > let me know if I need to > post this message to some other user group list.). > > Thanks. > > > Amir > System Analyst, SCC, > K.S.A. > (00-966-03-8344500 X267) > > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to > RPG400-L@midrange.com. > | To subscribe to this list send email to > RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to > RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list > owner/operator: david@midrange.com > +--- __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-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.