I think the real question was how to tell sort to stop reading anymore
input records when it reaches the first record that's greater than the
selection criteria instead of reading through the rest of the file but not
selecting any of those records.  I'm not sure we have a way to do that but
I'm sure Frank will weigh in shortly.



Have a nice day,
Dave Betten
DFSORT Development, Performance Lead
IBM Corporation
email:  [email protected]
DFSORT/MVSontheweb at http://www.ibm.com/storage/dfsort/

IBM Mainframe Discussion List <[email protected]> wrote on 09/28/2010
10:41:46 AM:

> [image removed]
>
> Re: SORT question
>
> Farley, Peter x23353
>
> to:
>
> IBM-MAIN
>
> 09/28/2010 10:42 AM
>
> Sent by:
>
> IBM Mainframe Discussion List <[email protected]>
>
> Please respond to IBM Mainframe Discussion List
>
> > -----Original Message-----
> > From: IBM Mainframe Discussion List [mailto:[email protected]] On
> > Behalf Of Richard Pinion
> > Sent: Tuesday, September 28, 2010 10:31 AM
> > To: [email protected]
> > 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?
>
> OPTION COPY
> OMIT COND=(datepos,datelen,CH,GT,'YYYYMMDD')
>
> where YYYYMMDD is your selected date.  If date is not in character
> format, change CH and date literal to match actual format.
>
> You don't need the SORT keyword since this is just a copy.
>
> HTH
>
> Peter
> --
>
> This message and any attachments are intended only for the use of
> the addressee and
> may contain information that is privileged and confidential. If the
> reader of the
> message is not the intended recipient or an authorized representative of
the
> intended recipient, you are hereby notified that any dissemination of
this
> communication is strictly prohibited. If you have received this
> communication in
> error, please notify us immediately by e-mail and delete the message and
any
> attachments from your system.
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to