Tuesday, August 14, 2007

FTP on the 400 or the iSeries (lessons learned)

I got the simple assignment of sending some source code to a sister company.smile_sarcastic It would have been simple if I had only done it a couple of times. Windows to Windows is pretty straight forward. You can just zip and e-mail. With the iSeries I decided I would use FTP. Quick and easy, right?!

FTP can be done with only a few parameters. It can be pretty powerful, if you know what you're doing. I was trying pretty simple. This is the code I was trying to do.

FTP 'www.sisterco.com/SourceFromMe/'

put BASICDB/SRCSAVF SAVF

Pretty lowkey and nitty gritty, huh!? Well I got some errors. "Cannot find host 'www.sisterco.com/SourceFromMe' " I checked everything I could think of. I tried to check case, just the domain name, with http, nothing worked. I then decided to try and send it to my Laptop. Command line, IPCONFIG (got my address), back to the iSeries. Try......with no luck.smile_baringteeth

I broke down and started to ask some questions. No surprise I'm not running a FTP server on my laptop, the iSeries is. So instead of doing a push try a get. This worked marvelously. I then used FileZilla to send to the SisterCo.

A couple of notes:

  1. You may need to change transfer type to BINARY to avoid possible translation errors.
  2. You may need a userid and password. (I had this going to the iSeries to do the get.

Let me know if I forgot anything major. Later......