>The code below creates object properties based on text between the "|" delimiters. There are times when that text will also contain another "^" delimiter (or others). One sledgehammer solution I'm considering is to just replace all the "^" with "|" so that they are broken-up into separate properties (fields ultimately), but wondered if there was a way to trap them while processing in case I eventually need to treat them differently. The resulting properties/fields are manually defined and mapped with a data dictionary, so I don't have to know when there is a "^" delimiter - just that there is
a delimiter. Since the "^" delimiters really just define related pieces of information - for example "|Jay^Johengen|" contains FName and LName, I think going with the sledgehammer might work because I'm mapping both fields eventually anyway. Any thoughts?
>
>
>FOR ix=1 TO OCCURS('|',m.tcLine)
> ADDPROPERTY(loRecord, 'Field'+PADL(m.ix,3,'0'), STREXTRACT(m.tcLine,'|','|',m.ix,2))
>ENDFOR
>
Would it be possible to end up with more than 255 fields in this situation?
Also I guess you need to use alines again to use two different delimiters.
If it's not broken, fix it until it is.
My Blog