I don't have much to add that others haven't already said.
I notice that the dictionary examples in this thread leave attribute 4 blank.
Does that matter?
That is where multi-valued associations are defined.
There's a "C;..." syntax for the controlling attribute of the association,
& a "D;..." syntax for all the dependent attributes/correlatives.
Does BY-EXP exploit that knowledge?
U2 defines associations differently. UD relies on it, UV to lesser degree, but it is important. Don't know about D3 & Reality.
"ND" is cool. Does it report the number of values in the controlling attribute or the attribute referenced by the correlative?
I did not know that D3 had OCONVS, etc, for handling multivalued data. Is that only from inside basic or from a correlative or to be used in a (B-?)correlative called by a subroutine?
In D3 can you feed the correlative-called subroutine the entire record, like @RECORD in U2? If so, you can have the best of both worlds: write a subroutine to do the logic in basic, which is probably more maintainable than correlatives. But let that one subroutine be called by a set of correlatives where it passes back the desired datum from its calculated set.
Then you have the power of LIST & SELECT to do the higher level stuff.
One of the differences between Pick & Prime derivatives has been that PI fed the I-descriptor the entire multi[sub]valued field, delimiters & all, so you can/must deal with mv logic within the I-descriptor explicitly; whereas Pick fed the correlative one value at a time. There are +/-'s to both, a 'feature' & a shortcoming, depending on what you want to accomplish.
Mark: I, for one, would like to know what you solution is, once you solve the puzzle.
Mostly taking, a pittance of giving, Sorry. Not much in the spirit of Christmas, but Merry Christmas to all anyway.
Chuck Stevenson