PDA

View Full Version : Automation of FTP



Guest.Visitor
01-01-1995, 02:00 AM
I am about to implement an application which will involve transferring a text file from PC to AS400. Originally I was planning to use Client Access File Transfer, but then decided FTP may be more suitable. I know how to use FTP in interactive sessions on the 400, but do not know how to write a script to logon to the PC and perform the GET (presuming I can - the PC does have a fixed IP address). I would prefer to have the script on the 400 rather than the PC, as the PC is on a remote site, and if the script needs changing it will obviously be easier to do on a machine that is easily accessible. Thanks in advance

dchristie
12-01-2000, 09:04 AM
The following link should help. http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QB3ANL03/7.11.4

Guest.Visitor
12-01-2000, 01:32 PM
the problem I always ran into was the PC didn't have a static address. If yours does, you shouldn't have any problem using a standard script with a CL program. this is how I have done it. include these statements in the CL OVRDBF FILE(INPUT) TOFILE(*LIBL/WCLSRC) MBR(SCRIPTFILE) FTP RMTSYS('999.99.999.99') SCRIPTFILE contents: userid password (if required) cd /pcdirectory type ascii put as400lib/as400file.as400mbr pcfile.xxx close quit