Sergio,

Others have already pointed you at PIPE, I use it myself for
descending sorts. There is no descending option in CMS SORT. There is
a descending option in the XEDIT SORT command.

I don't know if your data is going to span across months, but sorting
the date formatted as DD/MM/YY using columns 1-8 will sort the first
of every month together, and you will not be in date order anymore.

For example, if your file contains dates from January and February,
and you sort on 1-8, you'll see this results:

01/01/11
01/02/11
02/01/11
02/02/11
03/01/11
03/02/11

and so on...

Ron

On Tue, Jan 4, 2011 at 8:10 AM, Sergio Lima <sergiovm...@hotmail.com> wrote:
> Hello List,
>
> We have a CMS file, with some fields.
> One of this field is a date, in the DD/MM/YY format.
> We also have 200 records medium by day.
> Another field, is a numeric percentage that I need get the top 50 for each
> day.
> So, We think execute a sort under a REXX EXEC , like this :
>
> trace r
> queue "1 8 63 65"
> "sort cpux9 batchw a cpux9 batd a "
> exit
>
> But, looking on HELP of sort command can't see the descending option.
>
> We think this, because after the sort, will write another REXX that read
> only the first 50 recordsĀ , and write another output file.
>
> Someone already have used the sort with descending order, or know if have
> another way to do this?
>
> Thanks very much,
>
> Sergio Lima Costa
> Sao Paulo - Brazil
>

Reply via email to