John wrote:
                                                                            
 >I'm having trouble with sorting based on date                             
 >Say bytes 1-5 of my record are in 'yyddd' format, so for Jan 2, 2006:     
 >06002 data.........                                                       
 >Is there a way to code my INCLUDE to include all records dated whatever   
 >"today" and "yesterday" are?                                              
                                                                            

>
> Well, I just found the answer by accident (I just tried using '-1',
hah!):
> INCLUDE COND=(1,5,Y2T,EQ,Y'DATE3'-1,OR,1,5,Y2T,EQ,Y'DATE3')
>
> Now for the $20M question: is there possibly a better, more efficient way
to
> code that?  I'm still relatively new to sorting with DFSORT and
> would enjoy any suggestions.

Better or more efficent in what way?  That DFSORT INCLUDE statement is
quite efficient.  Another way to code it would be:

   INCLUDE FORMAT=Y2T,COND=(1,5,EQ,Y'DATE3'-1,OR,
          1,5,EQ,Y'DATE3')

but I wouldn't say that's "better" and there's no difference in
"efficiency" between
the first way and the second way.

Y2x, Y'datex, Y'datex-n' and Y'datex+y' allow you to deal with 2-digit year
dates
using a century window set up by Y2PAST=x.  There are other, simpler forms
for
4-digit year dates (e.g. yyyyddd).

Since you're new to DFSORT and DFSORT's ICETOOL, I'd suggest reading
through "z/OS DFSORT:  Getting Started".  It's an excellent tutorial, with
lots of
examples, that will show you how to use DFSORT, DFSORT's ICETOOL and
DFSORT Symbols.  You can access it online, along with all of the other
DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html

Frank Yaeger - DFSORT Team (IBM)
 Specialties: PARSE, JFY, SQZ, ICETOOL, IFTHEN, OVERLAY, 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 [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