On 10/06/2011 06:03 AM, DUGALEIX Michaël wrote:
> - I wanted to have pairs of DETAIL/MASTER in the output (to use JOIN and
> SPEC afterwards), so I used the PAIRWISE option of LOOKUP.
> And the PAIRWISE option needs the ALLMASTER option, if I correctly read
> the LOOKUP diagram.
> So I used the ALLMASTER option, even if my reference doesn't have
> multiple masters.

Your logic's gotten a little twisted here.  Without ALLMASTER, the
output is *always* pairwise (one master for each detail), so the
PAIRWISE operand wouldn't mean anything.  If your reference has unique
keys, then you don't need ALLMASTER, so you don't need PAIRWISE.  You
can just use DETAIL MASTER.

  ... | L: lookup ... detail master | join 1 | ...

> - When you have multiple masters, how do you unravel them after
> having joined them with "join keylength" ?

Join them with a delimiter.  If you don't know enough about the input to
pick one, you can just escape any one character and then double it for
the delimiter:

  ... | change 3-* x00 x0001 | join keylength 2 x0000 | ...

Then unravel them with CHOP|JUXTAPOSE:

  (end /) ... | c: chop 2 | j: juxtapose | ...
    / c: | split at string x0000 | change x0001 x00 | j:

¬R

Reply via email to