Re: UNSTRING performance issue



Chris,

Years ago I never had problems with STRING. But UNSTRING, that was something else, and in the past and currently we see suggestions how to tackle it.

At the time a COBOL file based application, I had to try and figure out CSVs received from Amoco - no rhyme or reason to their ID fields; I had to get the historical data into COBOL files so that the end user could add fresh data to the COBOL application. At one stage I was even counting commas (,) and quotes ("), to ensure some twit hadn't used a mixture of :-

4 IN ELBOW PIPE
4 INCH ELBOW PIPE, and the 'luverly' one,
4" ELBOW PIPE

Too long ago now to remember specifics, but I did specify a record format for my incoming CSV Files. If *only* you can get the other end to generate fixed length, then :-

01 CSV-Record.
 05 CustomerNumber	pic x(06).
 05 filler		pic x value ",".
 05 CurrentBalance	-zzz,zz9.99.
 05 filler              pic x value ",".

Move CustomerNumber to .....
Move CurrentBalance to ......

OR, better still MOVE CORRESPONDING......

Strictly speaking, if you can get fixed length, then you don't really need the commas.

As of now, from my MS Access - generate a CSV - tell the other end the Row/Column format they are getting and let them figure out how to get it into their DB package ! (I'll help them, at a price, to shuffle my output around).

Jimmy
.