01 WS-STRING PIC X(38)
01 WS-I PIC S9(04) COMP-3
This first is an example of the problem with potentially trying to "de-code" a CSV. You want the double quote, but that causes a compile error. A compiler has strict definitions for what its input can look like. User-entered data which is exported to a CSV does not. So, problem "de-coding" (or de-CSVing) it.
Well, if you have to have the double quote, what do you do?
first-part-of-line pic x(whatever).
opening-double-quote pic x value QUOTE.
text-in-quotes pic x(whatever).
closing-double-quote pic x value QUOTE.
rest-of-line pic x(whatever).
Don't think you'll need the trailing comma.
With comp-3, my advice, always an odd number of digits (so here, 5). Else you end up with half a byte that the compiler might generate extra code for to always keep a value of "0" there (depends on compiler option, see an earlier discussion mentioning TRUNC).
For Manju Venkat, ff the program goes ahead and it needs fields, also import your test data into something which understands CSVs. Like a spreadsheet. If you get the same results, then you are doing well.