Re: OMVS Sort Question

2021-09-09 Thread Mike Schwab
ion. Character is what you > are, reputation merely what others think you are.” - - - John Wooden > > -Original Message- > From: IBM Mainframe Discussion List On Behalf Of > Martin Packer > Sent: Thursday, September 9, 2021 6:51 AM > To: IBM-MAIN@LISTSERV.UA.EDU >

Re: OMVS Sort Question

2021-09-09 Thread Lionel B. Dyck
hn Wooden -Original Message- From: IBM Mainframe Discussion List On Behalf Of Sri h Kolusu Sent: Thursday, September 9, 2021 8:47 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: OMVS Sort Question > What I would like to do is to sort the 2nd field in reverse and then > sort the 1st fie

Re: OMVS Sort Question

2021-09-09 Thread Sri h Kolusu
> What I would like to do is to sort the 2nd field in reverse and then sort > the 1st field in ascending - this does not seem possible. Lionel, You need to use the option "r" to perform the descending sort on the 2nd field. –r Reverses the order of all comparisons so that sort writes output

Re: OMVS Sort Question

2021-09-09 Thread Lionel B. Dyck
rely what others think you are.” - - - John Wooden -Original Message- From: IBM Mainframe Discussion List On Behalf Of Patrick Hayward Sent: Thursday, September 9, 2021 8:39 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: OMVS Sort Question Can you not use -k2,2r Zlinux >From the man

Re: OMVS Sort Question

2021-09-09 Thread Patrick Hayward
Can you not use -k2,2r Zlinux From the man page KEYDEF is F[.C][OPTS][,F[.C][OPTS]] for start and stop position, where F is a field number and C a character position in the field; both are origin 1, and the stop position defaults to the line's end. If neither -t nor -b is in effect,

Re: OMVS Sort Question

2021-09-09 Thread Lionel B. Dyck
RV.UA.EDU Subject: Re: OMVS Sort Question Pipe it through two sort commands? And does sort helpfully avoid rearranging records with the same key value? Cheers, Martin Martin Packer WW z/OS Performance, Capacity and Architecture, IBM Technology Sales +44-7802-245-584 email: martin_pac...@uk.ibm.com

Re: OMVS Sort Question

2021-09-09 Thread Martin Packer
e: 09/09/2021 12:25 Subject:[EXTERNAL] OMVS Sort Question Sent by:"IBM Mainframe Discussion List" I know how to use sort - to a limited degree. This will wort a stem using the 2nd field and sort in reverse: call bpxwunix 'sort -r -k 2',in.,out.,msg. What I would l

OMVS Sort Question

2021-09-09 Thread Lionel B. Dyck
I know how to use sort - to a limited degree. This will wort a stem using the 2nd field and sort in reverse: call bpxwunix 'sort -r -k 2',in.,out.,msg. What I would like to do is to sort the 2nd field in reverse and then sort the 1st field in ascending - this does not seem possible. Any