Re: [U2] Regarding: LISTING SUB-VALUES

Will Johnson <[email protected]>
Newsgroups gmane.comp.db.u2.general
Message-ID <[email protected]>
Or @RECORD<3,3>

I wonder if using the @Record in this way, would be a microsecond faster than using CUSTOMER.PHONE.NUMBER ?
It would seem like the processor would have one less step to do, but maybe I'm wrong.



-----Original Message-----
From: Charles Stevenson-2 [via U2 (UniVerse & UniData)] <[email protected]>
To: Will Johnson <[email protected]>
Sent: Fri, Dec 27, 2013 5:32 am
Subject: Re: Regarding: LISTING SUB-VALUES


	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
[hidden email]
http://listserver.u2ug.org/mailman/listinfo/u2-users
				
	
	
	
		
If you reply to this email, your message will be added to the discussion below:
		http://u2-universe-unidata.1073795.n5.nabble.com/Regarding-LISTING-SUB-VALUES-tp42409p42411.html	
	
		To start a new topic under U2 - Users, email [email protected] 
		To unsubscribe from U2 (UniVerse & UniData), click here.
		NAML	





--
View this message in context: http://u2-universe-unidata.1073795.n5.nabble.com/Regarding-LISTING-SUB-VALUES-tp42409p42413.html
Sent from the U2 - Users mailing list archive at Nabble.com.
_______________________________________________
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.