SiouxCityElvis
Programmer
I am running RMCOBOL-85 on Linux.
I am reading in comma delimited file records. I am not allowed to have our clients send us the data any different than how they currently do.
The challenge is that when they take their excel spreadsheet, save as .csv, fields that have commas within them will put quotes around that field.
Example of record I receive within a comma delimited file. And I have to handle this scrubbing of data within my COBOL code.
Bill Smith,444-55-6666,999999999,1234567,"$1,060.46 "
So, my question is, how am I to UNSTRING BLAH-REC DELIMITED BY ","
when I run into the trouble of "," within a field?
Also, I need to scrub the "$" out.
The fields vary in length, so I'm thinking I can't just substring the record and parse it into different fields then scrub the fields individually.
There's going to have to be INSPECT statements somewhere in the creative approach to this I imagine, but beyond that, I'm stumped.
Thanks.
-David
I am reading in comma delimited file records. I am not allowed to have our clients send us the data any different than how they currently do.
The challenge is that when they take their excel spreadsheet, save as .csv, fields that have commas within them will put quotes around that field.
Example of record I receive within a comma delimited file. And I have to handle this scrubbing of data within my COBOL code.
Bill Smith,444-55-6666,999999999,1234567,"$1,060.46 "
So, my question is, how am I to UNSTRING BLAH-REC DELIMITED BY ","
when I run into the trouble of "," within a field?
Also, I need to scrub the "$" out.
The fields vary in length, so I'm thinking I can't just substring the record and parse it into different fields then scrub the fields individually.
There's going to have to be INSPECT statements somewhere in the creative approach to this I imagine, but beyond that, I'm stumped.
Thanks.
-David