Oh absolutely. A reusable subroutine is a very important "biggie"!
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ross Ferris Sent: Saturday, August 21, 2004 5:58 PM To: [EMAIL PROTECTED] Subject: RE: [U2] [UD] Sorting And the "biggie" here is that once this has been done, you change the program that builds up the MV list so that it sorts/stores the dates in the order you want/need :-) Ross Ferris Stamina Software Visage an Evolution in Software Development >-----Original Message----- >From: [EMAIL PROTECTED] [mailto:owner-u2- >[EMAIL PROTECTED] On Behalf Of Kevin King >Sent: Saturday, 21 August 2004 2: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 >************************************************ >* 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/ > > >--- >Incoming mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.742 / Virus Database: 495 - Release Date: 19/08/2004 > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.742 / Virus Database: 495 - Release Date: 19/08/2004 ------- 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/
