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
 
Retrieve Records Within date range

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

New User


Joined: 30 Aug 2006
Posts: 8

PostPosted: Tue Nov 28, 2006 1:31 pm    Post subject: Retrieve Records Within date range
Reply with quote

I would like to retrieve the records within a particular date range.

I think the control card should look like this:

For example,

the flat file contains date in 52nd position like 2006-11-21. I would like to retrieve records between 2006-10-01 and 2006-11-31.

INCLUDE COND = (52,10,CH,GE,DATE1(-)'2006-10-01', OR,
52,10,CH,LE,DATE1(-)'2006-11-31')

But this is not working.

Sreedhar
Back to top
View user's profile Send private message

subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 363
Location: Earth

PostPosted: Tue Nov 28, 2006 3:11 pm    Post subject: Re: Retrieve Records Within date range
Reply with quote

Hi,
Try this
Code:

INCLUDE COND=(52,10,CH,GT,C'2006-10-01',AND,52,10,CH,LT,C'2006-11-31')
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 Nov 28, 2006 9:31 pm    Post subject:
Reply with quote

Sreedhar,

Here's a DFSORT job that will do what you asked for. I assumed you wanted to include records between 2006-10-01 and 2006-11-31 inclusive.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INCLUDE COND=(52,10,CH,GE,C'2006-10-01',AND,
    52,10,CH,LE,C'2006-11-31')
/*


Note: You can't just make up your own syntax for DFSORT and expect it to work. You have to look up the actual syntax to use. If you're not familiar with 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
Back to top
View user's profile Send private message
spamidighantam

New User


Joined: 30 Aug 2006
Posts: 8

PostPosted: Wed Nov 29, 2006 6:16 am    Post subject: Re: Retrieve Records Within date range
Reply with quote

Thank you so much ...
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 records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm

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