Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Dates and comparisons

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
tampakenny

New User


Joined: 15 Feb 2006
Posts: 11
Location: Tampa, FL

PostPosted: Tue May 09, 2006 8:02 pm    Post subject: Dates and comparisons
Reply with quote

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)
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue May 09, 2006 8:51 pm    Post subject:
Reply with quote

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:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/

I'm not sure of the positions of your fields, but I'd guess the control statements you need are:

Code:

   INCLUDE COND=(2,7,CH,EQ,C'150ALRM',AND,   
     213,6,CH,LT,DATE2,AND,                 
     213,6,CH,GE,DATE2-1)                   
   SORT FIELDS=COPY                         
Back to top
View user's profile Send private message
tampakenny

New User


Joined: 15 Feb 2006
Posts: 11
Location: Tampa, FL

PostPosted: Tue May 09, 2006 9:15 pm    Post subject:
Reply with quote

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.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sort Card : To get the records with ... pecsakthivel123 DFSORT/ICETOOL 7 Thu Dec 10, 2015 11:54 pm
No new posts difference between dates in months C... josepnass Testing & Performance analysis 6 Wed Jun 18, 2014 2:30 am
No new posts problem in difference of dates Kmr.deepakcs DFSORT/ICETOOL 8 Fri Oct 25, 2013 10:19 am
No new posts How to calculate days which is differ... mahe1015 PL/I & Assembler 6 Mon Oct 21, 2013 4:39 pm
No new posts Difference between dates in European ... expat DFSORT/ICETOOL 5 Tue Mar 19, 2013 8:27 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us