CSV Utility
Back in 2008, I wrote a CSV utility (sometimes called "CSVR4") that could be used to read CSV files properly in an RPG program. You can read that article here (sorry, there isn't much formatting):
By popular demand I have put the code for this article here on my web site for people who would like to use it. The link is below:
UPDATE 2018-10-11: Added CSVINTO for DATA-INTO support. This requires IBM i 7.2+