Best approach when combining the <-1> function with values that may be null,
especially when updating associated fields, is to not allow the null value
(no null debates) rather to use a token '*' character to at least force the
values  (253 or 254) to grow properly.

The <-1>="" is historically inconsistent across platforms. Using <-1>="*"
then converting the '*' to '' leaves the elements intact.

If i'm growing a bunch of associated attributes with some transaction, i
look for one of the values that is always present and use a DCOUNT to count
its elements and then add +1 to force the new syncronized mv's using
REC<5,MV>=val. Thus if REC<8,MV>is assigned to null, at least that
transaction will be in the mv'th multivalue.

ALso, if using the INSERT or INS function to put it at the beginning MV,
watch out for nulls as well.

my 1 cent.
----- Original Message -----
From: "Darren Percival" <[EMAIL PROTECTED]>
To: "U2 Users Discussion List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 03, 2004 12:58 AM
Subject: Re: VARIABLE<-1> = '' Inconsistent behaviour


> At 04:55 AM 3/02/2004 +0000, you wrote:
> >Hi All,
> >
> >Consider the program:
> >
> >A = ''
> >A<-1> = ''
> >A<-1> = ''
> >A<-1> = 3
> >A<-1> = ''
> >A<-1> = 4
> >PRINT A<3>
> >
> >I expect it output '3' but it outputs '4'. Whats the explanation? I'm on
> >UV 9.6 [NT] running information flavour.
> >
> >Regards,
> >Marco
> >
>
>
> Check what "A" really is just before your print.
> I think that you will find it is   "3" @FM '"" @FM "4"
> and not ""@FM "" @FM "3" @FM "" @FM  "4"
>
> So that A<3> gives the you 4 not the 3 you expect
>
>
> IIRC I have seen this behavior before where
>
> A = "" and A<-1> = "" doesn't actually result in the marker being appended
> to the array.
>
> Unfortunately I cant remember/don't know the reasoning or the why behind
> it. I will try and find out the situation I saw it if nobody else can shed
> any light.
>
> Cheers,
>
>          .....Darren.....
> ============================================================
> Law of Probable Dispersal:
>      Whatever it is that hits the fan will not be evenly distributed.
> ===========================================================
>
>
> _______________________________________________
> u2-users mailing list
> [EMAIL PROTECTED]
> http://www.oliver.com/mailman/listinfo/u2-users

_______________________________________________
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to