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 Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am

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