I'm trying to pull all records from a file that have an effective date (which is in a field in the file) during the last month. I know I could hardcode it each month to pull what I want, but wanted to try to automate it. I know I've done other good stuff with sort and icetool, so hopefully somebody will be able to help. Here's one of the many things I've tried, all of which give syntax errors. I've also tried moving it to the include, using ADD and/or SUB, and other things. Is it possible to manipulate the date for comparison purposes?
INREC FIELDS=(DATE2,DATE2-1,1,261)
INCLUDE COND=(14,7,CH,EQ,C'150ALRM',AND,
219,6,CH,LT,1,6,AND,
219,6,CH,GE,7,6)
SORT FIELDS=COPY
OUTREC FIELDS=(13,261)
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
You can use DATE2 and DATE2-1 in the INCLUDE, OMIT, INREC, OUTREC and OUTFIL statements with DFSORT, but you'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006). If you don't have it, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTFs, see:
That's exactly what I needed. Thanks for the link to the doc too. It's much appreciated. I'll get with the systems guys and see if we can get this PTF installed.