Because we're talking about a very long string,
& because we only care about the truth value of MORE.FLAG, not it's numeric
value,
It is better to initialize MORE.FLAG as:

   MORE.FLAG = LEN( MVDATA )

instead of

   MORE.FLAG = ( MVDATA # '' )

At least, that's true on UV.
UV keeps the length of a string as part of the header info in the string's
memory spot.  Extracting the length is quicker than retrieving the string
itself.

The other form has to load all of MVDATA into a register, the load null
into another register, then run it through the not-equal routine to compare
the 2 strings.

I think the same basically holds for UD as well as UV.



On Thu, Jun 7, 2012 at 11:45 AM, David A. Green <dgr...@dagconsulting.com>wrote:

> X = RECORD<31> isn't your issue.
>
> This is your issue:
> CNT = DCOUNT(MVDATA, @VM)
> FOR PTR=1 TO CNT
>  SNGDATA = MVDATA<1, PTR>
>  ...
> NEXT PTR
>
> Use instead:
> MORE.FLAG = (MVDATA # "")
> LOOP WHILE MORE.FLAG DO
>  SNGDATA = REMOVE(MVDATA, MORE.FLAG)
>  ...
> REPEAT
>
> Of course other factors can help your decision on how to store your data.
>
> 1. Does it need to be sorted?
> 2. How do you need to retrieve it?
>
> David A. Green
> (480) 813-1725
> DAG Consulting
>
> -----Original Message-----
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt
> Sent: Thursday, June 07, 2012 9:30 AM
> To: u2-users@listserver.u2ug.org
> Subject: [U2] FW: Multivalue Question
>
> Unidata 7.1.20 Pick Flavor
>
>
>
> I am going to end up with a situation where I will have a multivalue field
> that contains 5500 +/- values.  Each value will be 5-characters long.
>
>
>
> I'm concerned that this will issues with the following statement: X =
> RECORD<31>
>
>
>
> I've tried searching the manuals and can't find a good answer.
>
>
>
> Appreciate your input.
>
>
>
> Albert DeWitt, CPIM
>
> _______________________________________________
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
> _______________________________________________
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to