Could you use some stages to force fields 3&4 to be quoted? Maybe change ' to ", add ' to each end of field 3, change '" to ' and "' to ', repeat for field 4?
I am at home without a pipelines capable system or I would have tried it first. Sorry. /Tom Kern Glenn Knickerbocker wrote: > I have one of those annoying input files with fields that contain > *either* blank-delimited words *or* quote-delimited strings. The > program that generates it politely looks for the longest value in the > first field and pads the field to that length to line them up in > columns: > > AMDSADVI PLX 'PL/X-390 V02 R04 M00' 'HLASM R5.0' > AMDSAEDR PLX PLX241 ASMHL4.0 > > but it doesn't *report* that length, and the second field isn't present > in every record (and of course the records are padded to a fixed length) > so I can't just peek the first record to find its column. I need to do > a bunch of manipulations on each field, taking out unwanted characters, > using LOOKUP to replace some values, etc., and then put the whole record > back together. Anybody have a handy way to split up a record with > fields like this? > > I *think* I can trust that the quoted values never start or end with > blanks, if that helps any. I suppose, given that, I could find the > records where the first field starts with a quote, CHOP those AFTER > STRING "' ", and just CHOP the others at a blank. > > ¬R >
