And, as he only want the first 50, the pipe can be easily extended:
 'PIPE < cpux9 batchw a | sort 1-8 descending 63-65 | take 50 | > cpux9
bat50 a'
What then?  Process in REXX?  If so, change the pipe to write into a stem
 'PIPE < cpux9 batchw a | sort 1-8 descending 63-65 | take 50 | stem REC.'
 do i=1 to rec.0
    ....

To learn something about CMS Pipelines, consider our free, self study,
course:
   http://www.vm.ibm.com/download/packages/descript.cgi?TCVM2
Once you get away with PIPE, you can gain lots of time by not having to code
many REXX statements as they can be replaced by some PIPE stages.


2011/1/4 Fran Hensler <[email protected]>

> Sergio -
>
> Take a look at HELP PIPE SORT.
>
> 'PIPE < cpux9 batchw a | sort 1-8 descending 63-65 | > cpux9 batd a'
>
> /Fran Hensler at Slippery Rock University of Pennsylvania USA for 47 years
>    mailto:[email protected]  
> http://zvm.sru.edu/~fjh<http://zvm.sru.edu/%7Efjh> +1.724.738.2153
>              "Yes, Virginia, there is a Slippery Rock"
> --------------------------------------------------------------------------
> On Tue, 4 Jan 2011 17:10:16 +0300 Sergio Lima said:
> >
> >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
>



-- 
Kris Buelens,
IBM Belgium, VM customer support

Reply via email to