Jonathan:

Despite the digression about your code, I think the TRIM() function should
work just fine.

On D3, however, no matter how many leading or trailing @VMs exist, a single
@VM remains at the beginning and/or end of the string.  This is true even
with Glenn's suggestion, TRIM(REC<1>, @VM, "R").

This works fine on U2, but if you need to port to D3 you'd need to revert to
a modified version of the code you included below.

Hope this helps.

Bill

> -----Original Message-----
> Behalf Of Jonathan Leckie
> Sent: Thursday, March 25, 2004 4:29 AM
> To: [EMAIL PROTECTED]
> Subject: Optimisation ?
>
>
> I have the following piece of code :
>
> IF REC<1> £ '' THEN
>   MAX=DCOUNT(REC<1>,VM)
>   FOR LOP=1 TO MAX
>     IF REC<1,LOP> = '' THEN
>       REC=DELETE(REC,1,LOP,0)
>       IF LOP = MAX THEN GO 300
>       LOP=LOP-1
>     END
>   NEXT LOP
> END
>
> I wonder could this simply be replaced with :
>
> IF REC<1> £ '' THEN
>   REC<1>=TRIM(REC<1>,@VM)
>   GO 300
> END
>
> Can anyone see any problems with using TRIM to remove trailing,
> repeated and
> initial value markers and therefore achieving the same effect without
> looping through each multi-value?  This is on Unidata 3.3.2
> incidentally.

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

Reply via email to