A good way to access files on the IBM i is via an FTP client. I like to use a popular open source program called FileZilla.
The IBM i’s native file system is flat with all objects contained in libraries. Objects can be files, programs and other things native to the IBM i, such as out queues, message queues etc. It also supports a more common directory based system in its IFS – Integrated File System. There are plenty of more in depth article about the IFS on the internet!
To use FileZilla with your IBM i, first of all set up a new site. I’m using pub400.com as an example.
Then in the Advanced tab, instead of starting in your home IFS folder, you could change the default to your named library. All libraries have a “.lib” file type, files are “.file” and file members are “.mbr”. All libraries are contained in the QSYS.lib library which is in the root directory of the IFS.
Now save and connect.
Sometimes, depending on how the IBM i FTP server is set up, you need to specify the namefmt you want to use, if the server does not detect it automatically. To do this you’ll need to add the following text to the sitemanager.xml file at the end of the server set up. NAMEFMT 1 allows you to specify IFS directories in the advanced tab.
<PostLoginCommands> <Command>SITE NAMEFMT 1</Command> <Command>SITE LISTFMT 1</Command> </PostLoginCommands>
This xml file can usually be found here:
Add those lines within the server tag of the IBM i site , ensuring all the elements are within that tag. Make sure it is within the server close tag otherwise those lines will keep disappearing once you fire up FileZilla.
The contents of the file should look like this:
Lastly if you’re transferring source code then make sure you have the transfer setting set to ascii.
And away you go!