Hi Frank, That gives me exactly what I want thanks very much for your help.
Thanks James -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Frank Yaeger Sent: 30 January 2012 18:51 To: IBM-MAIN@bama.ua.edu Subject: Re: Sort repeating date field James, I think I understand what you're trying to do and you can use DFSORT's WHEN=GROUP function to do it. Here's an example: //S1 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD * 01/20/12 08:00 01/20/12 08:59 XRQ0 1 1.419 X257 63 .178 01/20/12 09:00 01/20/12 09:59 ACFT 12 .001 CATA 177 .008 CATD 34 .005 CDTS 9 .003 //SORTOUT DD SYSOUT=* //SYSIN DD * OPTION COPY INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,2,CH,NE,C' '), PUSH=(1:1,30)) /* SORTOUT would have: 01/20/12 08:00 01/20/12 08:59 XRQ0 1 1.419 01/20/12 08:00 01/20/12 08:59 X257 63 .178 01/20/12 09:00 01/20/12 09:59 ACFT 12 .001 01/20/12 09:00 01/20/12 09:59 CATA 177 .008 01/20/12 09:00 01/20/12 09:59 CATD 34 .005 01/20/12 09:00 01/20/12 09:59 CDTS 9 .003 Does that help? Frank Yaeger - DFSORT Development Team (IBM) - yae...@us.ibm.com Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration => DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN -- This is a confidential communication and is intended only for the addressee indicated in the message (or duly authorised to be responsible for the delivery of the message to such person). You are specifically prohibited from copying this message or delivering the same, or any part thereof, to any other person, whomsoever or howsoever, unless you receive written authorisation from us to do. If you are anyone other than the intended addressee, or person duly authorised and responsible for the delivery of this message to the intended addressee, you should destroy this message and notify us immediately. Please note that we accept no responsibility whatsoever in the event that this message or any other email message or any part thereof becomes known or is communicated to anyone other than the intended recipient or other person authorised in writing by us to receive it, howsoever arising and disclaim all liability for any losses or damage which may be sustained by any person as a result thereof. Irish Life Assurance plc is regulated by the Central Bank of Ireland. Irish Life Financial Services Limited is regulated by the Central Bank of Ireland. "Irish Life" is a member of the Irish Life and Permanent plc group. Irish Life Assurance plc is a company registered in Ireland. Registered office is situated at Irish Life Centre, Lower Abbey Street, Dublin 1. Registered Number 152576. Irish Life Financial Services Limited is a company registered in Ireland. Registered office is situated at Irish Life Centre, Lower Abbey Street, Dublin 1. Registered Number 489221. ============================================================================== ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN