Sort Fields Question

2011-01-04 Thread Sergio Lima
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

Re: Sort Fields Question

2011-01-04 Thread Frank M. Ramaekers
Lima Sent: Tuesday, January 04, 2011 8:10 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Sort Fields Question 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

Re: Sort Fields Question

2011-01-04 Thread Fran Hensler
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:f...@zvm.sru.edu http://zvm.sru.edu/~fjh +1.724.738.2153 Yes, Virginia, there is a

Re: Sort Fields Question

2011-01-04 Thread Sergio Lima
Hello Frank, and Fran. PIPE run well. pipe cpux9 batchw a | sort 1-8 descending 63-65 | cpux9 batd a Thanks very much for your help. Regards, Sergio Date: Tue, 4 Jan 2011 09:37:44 -0500 From: f...@zvm.sru.edu Subject: Re: Sort Fields Question To: IBMVM@LISTSERV.UARK.EDU

Re: Sort Fields Question

2011-01-04 Thread Kris Buelens
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

Re: Sort Fields Question

2011-01-04 Thread Ron Schmiedge
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