Search code examples
ftpibm-midrange

AS400 FTP to windows server


I want to write a CLLE Program to transfer Files from the IFS to a Webserver.

The Webserver is registered in the Hosttable from the Iseries. (commandline: CFGTCP -> Option 10 -> Scroll to the Webserver IP)

Current CLLE Program: (only the ftp-access)

PGM  
OVRDBF     FILE(INPUT) TOFILE(CMDDTAR7_2/US9FIP) OVRSCOPE(*JOB)  
OVRDBF     FILE(OUTPUT) TOFILE(CMDDTAR7_2/US9FOP) + 
             OVRSCOPE(*JOB)  
FTP        RMTSYS('10.1.2.99') 
ENDPGM     

After i call my Program i get some results in a PF-File. The Results are in German but i translated shortly for you.

The Connection is unavalable to 10.1.2.99 on Port 21. Try it again later. [...]

My Question at the end. Do you have some solutions for me to transfer xml files to my Webserver from the iseries?


Solution

  • You're writing about a web server and you want to transfer files by ftp. Perhaps you're mixing up protocols here. I'll concentrate to resolve your apparent ftp connection problem.

    Seems that the destination host 10.1.2.99 doesn't accept connections on Port 21.

    Please make sure, there's no firewall or other stuff blocking your request to the destination host. Moreover, on the host 10.1.2.99 try telnet 10.1.2.99 ftp or ftp 10.1.2.99 in a command window, depending on OS and installed components.

    Before automating, just test manually if you can successfully connect and log in via standard command line: ftp 10.1.2.99.

    Transferring data by FTP is just fine in a local LAN. Beware that any data including username and password will be transferred in clear text and thus can be possibly read by others as the intended hosts.