|
I've been working with both the DATA-INTO and the free CSV utility that Scott Klement wrote. I have a couple of CSV files that I generate daily out of our payroll system. If I try and do a simple client access data transfer I end up with some weird characters in the first column of the first record. I also get similar results when I use the DATA-INTO and the CSV utility from Scott Klement. If I run the program in debug mode I see that the first field of the first column is padded with what looks like this.

It was suggested to me that the issue could be that the CCSID is not UTF-8. It was also mentioned that I may be dealing with files that have BOM (Byte over mark) in them. I'm not sure if I'm doing this correctly, but if I do a WRKLNK, locate the file, and check the properties of the file on the IFS I see the coded character set ID is 1252. I'm not sure if that means the file is UTF-8 or not.
How do I get around the issue of the BOM? Any help would be greatly appreciated. What I have been doing in the mean time is downloading the file as an Excel file, opening it up in Excel, and then saving it as a CSV file. Doing that drops the BOM, but that seems like a lot of extra work.The CCSID attribute for stream files are like the TEXT() parameter on
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.