Often when offering support for customers (or even non-customers) part of the debugging process may involve copying trace and/or debug files from the IFS on the IBM i to your PC in order to be emailed to a support contact.
Surprisingly, this is often something that the end user needs help with. So, here are a couple of the methods I use:
Yes, good old FTP will do the job just fine! The only real thing to remember is if you are transferring binary files (such as images, PDF, or anything that's not really plain text) is to make sure to use binary mode.
If you want to use the standard Microsoft FTP client (which works just fine), here is all you need to do:
WRKACTJOB JOB(QTFTP*)
STRTCPSVR SERVER(*FTP)
ftp
" in the command prompt that is opened. This will open a DOS prompt and start the Microsoft Windows FTP client.The following example is using FTP to download a file named test.json from the /tmp directory to my PC into a directory named c:\temp. (I always create a temp directory on my PCs so I know I can always download things to this place with an easy to remember name). The text in red is what you will type. Of course replace the IP address, user id and password with those values for your system.
ftp> open 192.168.1.xx |
The only thing you may need to change is if you are downloading a binary type file be sure to issue the bin command before the get command. If you need to switch back to text mode to download text files just issue the ascii command. Super simple!
And don't forget you can use wild cards with FTP. If you wanted to download all files that start with "mailtool" you could use:
mget mailtool*
Or if you wanted to download all files with an extension of .json you could use:
mget *.json
FTP is still quite a viable option for those that aren't familiar with other options that follow.
NetServer, I think, is one of the most underused options on the IBM i system these days. Setting it up isn't that hard, and once it is it makes copying files from the IFS on your IBM i to your PC as easy as transferring files from a network drive to your PC, or even from directory to directory on your PC.
Here is a great article on Configuring NetServer on your IBM i (from IBM! I have to say their documentation is getting a lot better!)
Once that is set up you simply need to set up shares for directories on the IFS and they should show up in your Windows Explorer window under Network.
I will add more options when I have time, but these two I feel are the most simple and easy to use (especially FTP!)