Please note two things:

1. The resulting list (in this case) has only unique dates - it strips
the duplicates
2. No other attributes are also getting sorted.

Depending on your data and file structure this is either OK or *REALLY
BAD*. Of course, it is trivial to update this sample to work with either
scenario....

Hth
Colin Alfke

-----Original Message-----
From: Kevin King [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 20, 2004 9:24 AM
To: [EMAIL PROTECTED]
Subject: RE: [U2] [UD] Sorting


You could write a simple insertion sort routine to reorder the
information.  Assuming the list is called DATE.LIST and you want
ascending right-justified sorting, something like this might work:

NEW.DATES = ''
DATE.CNT = DCOUNT(DATE.LIST,@VM)
FOR DATE.LOOP = 1 TO DATE.CNT
  THIS.DATE = DATE.LIST<1,DATE.LOOP>
  LOCATE(THIS.DATE,NEW.DATES,1;PTR;'AR') ELSE NULL
  NEW.DATES = INSERT(NEW.DATES,1,PTR,0,THIS.DATE)
NEXT DATE.LOOP
DATES = NEW.DATES

-Kevin
[EMAIL PROTECTED]
http://www.PrecisOnline.com

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Shawn Waldie
Sent: Friday, August 20, 2004 9:46 AM
To: [EMAIL PROTECTED]
Subject: [U2] [UD] Sorting

I have records that contains a mv list of dates, i.e.,
13200:@VM:13312:@VM:13176.  I need to store these values in ascending
order, so I: a) convert the VMs to AMs, b) perform a FORMLIST,
SAVE.LIST, SORT.LIST; and c) load the values back into the attribute.
There has to be a more efficient way.  Any suggestions?

  
TIA
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to