Information Systems:FTP connectivity on IBM i
(Wikipedia) The File Transfer Protocol (FTP) is a standard network protocol used to transfer computer files from one host to another host over a TCP-based network, such as the Internet.
You can run it from a green screen by keying FTP host-name. You will be asked for a user ID and password, then have access to this other computer through a command line.
We don’t do this in production; instead an RPG program will create a script of all the FTP commands required, then run it. We can do this with the command –
OVRDBF FILE(INPUT) TOFILE(QTEMP/QFTPSRCI) MBR(INPUT)
When the FTP command runs, instead of getting input from the keyboard, it will get it from this file. The following command will cause FTP to write any information or response to this file instead of the display.
OVRDBF FILE(OUTPUT) TOFILE(QTEMP/QFTPSRCO) MBR(OUTPUT)
You can see that this file is in the QTEMP library, which means its contents will be lost. We can run query EDQRP050 to output this file to the printer.
If the other FTP host is a Windows machine, we can access it with Explorer.
- Start Internet Explorer
- Click on Tools / Internet Options / Advanced
- Check ‘enable FTP folder view (outside of Internet Explorer)’
- In address, key in FTP://host-name
- When prompted, key in your user ID and password
- You may get a view of the host, or a message that it cannot be displayed
- Click on View / Open FTP Site in File Explorer
- Again, when prompted, key in your user ID and password
- You will then see everything to which you are authorised