×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
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?
You are referring to something that I wrote.
Yes, I am using this utility you wrote, running on V7R1 (We will be upgrading soon).
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.
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.
The program crashes on the csv_open command when I change the character type.
Thank you,
Mike
As an Amazon Associate we earn from qualifying purchases.