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 Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts CICS RETRIEVE pshongal CICS 2 Thu Mar 08, 2018 9:15 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm

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