> -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:ibm-m...@bama.ua.edu] On Behalf Of Richard Pinion > Sent: Tuesday, September 28, 2010 9:31 AM > To: IBM-MAIN@bama.ua.edu > Subject: SORT question > > I have a large file that is sorted in ascending order by a > date field, YYYYMMDD. I want to run a sort fields=copy with > selection criteria against this file. One of the selection > criteria is the date field. I would like the sort to > terminate once the date field in the file is greater than my > selection date. Is this possible?
Well, if Walt can't, I won't try. But a Q&D REXX would be: /* REXX */ do forever "execio 1 diskr sysut1" if rc <> 0 then leave "parse pull record" date=substr(record,<start>,8) if date > "YYYYMMDD" then leave queue record "execio 1 diskw sysut2" end "execio 0 diskr sysut1(finis" "execio 0 diskw sysut2(finis" Of course COBOL would be fairly simple and much more efficient. -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-691-6183 cell john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html