From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,b5097302cec4d6bb X-Google-Attributes: gidf7344,public X-Google-Thread: fc7fa,b5097302cec4d6bb X-Google-Attributes: gidfc7fa,public From: "joe huber" Subject: Re: sorting by date/time with DIRECTORY or SORT command Date: 1998/02/25 Message-ID: <6d18qk$6n6$1@news.monmouth.com>#1/1 X-Deja-AN: 328503193 References: <6cvet0$dt2$1@nnrp1.dejanews.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Organization: Monmouth Internet Newsgroups: comp.sys.vms,comp.os.vms splat@cfu-cybernet.net wrote in message <6cvet0$dt2$1@nnrp1.dejanews.com>... > >I am also interested in DCL commands and SORT/MERGE specification files that >will allow me to manipulate records with a date/time key. Sorting a list of dates is strait forward enough. Supposing a file containing a list of dates (something along the lines of): 01-JAN-1998 25-MAR-1945 05-SEP-1999 a specification file to do the trick would run as follows: (order.srt) /collating_sequence=(sequence= "AN","EB","AR","PR","AY","UN","UL", "UG","EP","CT","OV","EC","0"-"9"), modification=(" "="0"), fold) /field=(name=year,pos:8,siz:4)\ /field=(name=month,pos:4,siz:3) /field=(name=day,pos:1,siz:2) /key=year /key=month /key=day Assuming the above dates are in a file called dates.dat a $ sort/spec=order.srt dates.dat sys$output would list them in sorted order on your terminal. // like a bird in a cage, spreading its wings to fly // 'the old ways are lost' you sang as you flew // and I wondered why // // The Old Ways (Loreena McKennitt) // // Joe Huber jhuber@monmouth.com