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
************************************************
* Shawn Waldie                San Juan College *
* Programmer/Analyst         4601 College Blvd *
* Phone: (505)566-3072   Farmington, NM  87402 *
*      email: [EMAIL PROTECTED]       *
*                                              *
* HP-UX 11.11   UniData 6.0.4    Colleague R17 *
************************************************
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to