On 2018-11-01 4:36 PM, Rob van der Heij wrote:
> I may not be following your scenario, but aren't you looking for> insert ,:, 
> after w2 maybe?

Well, that's slightly more straightforward than my CHANGE, but it
doesn't help make the solution more general.

I realized what I'd overlooked about handling the word and the separator
together in SPECS was using PRINT to write them from an expression:

  specs ... a: w2 . print a||||":" nw.11 ...

Wordy, but it eliminates worrying about what the left-hand part of the
record or this input field looks like.  Instead of W2 I could have a
range or field and it would still work the same.

Input that overruns the padded length could be handled with another
expression.  It might start to look just as convoluted as my
FANOUT...GATHER solution, though, and it introduces a pair of numbers
that have to be kept matched up:

  ... a: w2 . print a||||":" nw.11 print substr(a||||":",12) n ...

All this is probably more useful to keep in mind when I need to combine
input fields from the record into a single output field:

   ... a: w2 . b: f4 . print a||||b nw.11 print substr(a||||b,12) n ...

¬R

Reply via email to