On 15/08/12 23:24, David Wolverton wrote: > I've done this in the past by doing this: > > SWAP DQUOTE WITH @AM > > Now, in theory, every EVEN attribute is a 'quoted' string - don't touch the > commas.... > Every ODD attribute is a 'non-quoted' string... > > Double check me here in case I've lost it... but this should work ... seems > this would be faster as well on larger records. Only thing you'd have to > test for -- if the first character is a doublequote, we will have a blank > first attribute and should not -- but that could be tested in the END ELSE > section (IF XXX = 1 THEN IF DATASTRING[1,1] = 1 THEN CONTINUE) > Given that you're parsing on a delimiter, actually the best tool here is probably MATPARSE! You need two dimensions, however.
Something like DIM ARRAY(100,2) MATPARSE STRING USING ',"' Until I actually played with it, I didn't realise it put text into column 1, and delimiters into column 2. Which makes it easy to ding through. If say you have a comma followed by two double quotes, it will put the comma in column 2, a blank in column 1, and then both double quotes in the next element in column 2. I was actually parsing a maths statement, but it was so easy ... Cheers, Wol _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users