Re: [U2] Regarding: LISTING SUB-VALUES

Charles Stevenson <[email protected]>
Newsgroups gmane.comp.db.u2.general
Message-ID <[email protected]>
Anthony meant:
     002: CUSTOMER.PHONE.NUMBER<1,3>

On 12/27/2013 1:08 PM, Wols Lists wrote:
> CUSTOMER.PHONE.NUMBER.3
> 0001: I
> 0002: CUSTOMER.PHONE.NUMBER<3>
<1,3> extracts the 3rd value from that single attribute.
<3> extracts the 3rd attribute, which in this case would yield null.
CUSTOMER.PHONE.NUMBER already extracted the 3rd attribute.
So it is an array 1 attribute long, but with multivalues.

On UD, I think  this is customary:
     002: EXTRACT( CUSTOMER.PHONE.NUMBER,1,3 )

THE  <...>  syntax is really an alternate syntax of the EXTRACT function.

On UV, after you write your I-descriptor & compile it,
     DLIST CUSTOMER.FILE CUSTOMER.PHONE.3
will show you what it actually compiles to.
That can be illuminating.

I think this is beyond your immediate question but:
There are other fancier ways to get at multiple associated values 
aligned across several fields. Generally involves WHEN, BY.EXP, 
BY.EXP.DSND keywords.
You also need to make sure the I descriptors have an M in <6> and a 
common association name defined in <7>.

Regards,
cds


On 12/27/2013 1:08 PM, Wols Lists wrote:
> CUSTOMER.PHONE.NUMBER.3
> 0001: I
> 0002: CUSTOMER.PHONE.NUMBER<3>

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.