On Thu, Mar 20, 2008 at 5:43 PM, Glenn Knickerbocker <[EMAIL PROTECTED]> wrote:
> I have a file with a set of alternating keywords and values for each main
>  key:
>
>   mainkey  keyword value  keyword value  keyword value  etc.
>
>  For a certain set of main keys, I want to translate the values of several
>  keywords.  I'd like to avoid reformatting the whole file with SPLIT|JOIN,
>  so for now I've used a separate CHOP|XLATE|GATHER|JOIN for each one:

Why not? If you can break the record reliably in (keyword value)
pairs, then lookup could select all the keywords you need to process
(with a deal in case you have groups with different processing path).
If you need to retain the blanks (even when you change the word) then
you might be able to keep the blanks after value.

If your values are also words, you could do a series of changes for
w2, w4, w6, etc... but that looks like a Plumber's nightmare.

It smells a bit like my plumbing that makes assembler source into a
HTML cross reference (surround symbols by HTML to make them into
links, but retain the layout with blanks etc). That involves tricks
like an xlate to blank out all characters that are not part of
keywords, then break around words and count the length of each
section, feed that through parcel, and reconstruct the record after
the changes.

Rob
--
Rob van der Heij
Velocity Software GmbH
http://velocitysoftware.com/

Reply via email to