|
Why would 1208 produce a conversion error?I'm not sure. I'm very confused by all of this.
Is the data not properly encoded for 1208?I'm not sure. All I know is when I export the report from ADP, and save it to the IFS it comes out as character set 1252. That seems to be the only character set that the program likes.
Or, is the program not written to handle conversions properly?Yes, I am using this utility you wrote, running on V7R1 (We will be upgrading soon).
You are referring to something that I wrote.
https://www.scottklement.com/csv/
Can you tell me which utility this is, and what the code looks like?This is my RPG program that I'm testing with.
H DFTACTGRP(*NO) ACTGRP('KLEMENT') BNDDIR('CSV')
/copy CSV_H
D empno s 6a varying
D liccode s 10a varying
D licdesc s 40a varying
D licenseid s 20a varying
D licapldate s 10a varying
D liceffdate s 10a varying
D licexpdate s 10a varying
D prilicind s 1a varying
D csvfile s like(CSV_HANDLE)
D fc s 10i 0
D fld s 132a varying
D prt ds 132
/free
csvfile = csv_open('/mike/Professional Licenses.csv');
dow csv_loadrec(csvfile);
CSV_getfld(csvfile : empno : %size(empno));
CSV_getfld(csvfile : liccode : %size(liccode));
CSV_getfld(csvfile : licdesc : %size(licdesc));
CSV_getfld(csvfile : licenseid : %size(licenseid));
CSV_getfld(csvfile : licapldate : %size(licapldate));
CSV_getfld(csvfile : liceffdate : %size(liceffdate));
CSV_getfld(csvfile : licexpdate : %size(licexpdate));
CSV_getfld(csvfile : prilicind : %size(prilicind));
enddo;
csv_close(csvfile);
*inlr = *on;
/end-free
I have written many things that could be called "CSV utilities", and if the problem is the way my code is opening the file, I'd need to to see the specific code in order to comment on how it can be fixed.The program crashes on the csv_open command when I change the character type.
Of course, if you got it from me, you undoubtedly have the source code and could also fix it yourself. But, I'd be glad to give my thoughts, if I understood which tool we were working with.
Thank you,
Mike
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.