IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need records within the date range


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nelson.pandian

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Mon Nov 10, 2008 10:59 pm
Reply with quote

I have a requirement. My input file is of 80B and FB.

Input File
Code:
----|----1----|----2--
AAAA BBBBBB 11/05/2008
cccc cccccc 11/09/2008
DDDD DDDDDD 11/30/2008
EEEE EEEEEE 12/10/2008
FFFF FFFFFF 12/22/2008
GGGG GGGGGG 12/17/2008
HHHH HHHHHH 12/30/2008
IIII IIIIII 11/28/2008
JJJJ JJJJJJ 12/28/2008
KKKK KKKKKK 11/28/2008


output File
Code:
----|----1----|----2--
DDDD DDDDDD 11/30/2008
EEEE EEEEEE 12/10/2008
FFFF FFFFFF 12/22/2008
GGGG GGGGGG 12/17/2008
IIII IIIIII 11/28/2008
KKKK KKKKKK 11/28/2008


Output file should contain the records within the date range From current date TO (current date + 45) days

NOTE: Date can be duplicates. I need the output with duplicates.
can anyone give me the solution.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Mon Nov 10, 2008 11:19 pm
Reply with quote

You can use a DFSORT job like the one below to do what you asked for. I assumed your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
AAAA BBBBBB 11/05/2008
CCCC CCCCCC 11/09/2008
DDDD DDDDDD 11/30/2008
EEEE EEEEEE 12/10/2008
FFFF FFFFFF 12/22/2008
GGGG GGGGGG 12/17/2008
HHHH HHHHHH 12/30/2008
IIII IIIIII 11/28/2008
JJJJ JJJJJJ 12/28/2008
KKKK KKKKKK 11/28/2008
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(81:19,4,13,2,16,2)
  OUTFIL INCLUDE=(81,8,CH,GE,DATE1,AND,81,8,CH,LE,DATE1+45),
    BUILD=(1,80)
/*
Back to top
View user's profile Send private message
nelson.pandian

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Tue Nov 11, 2008 4:42 pm
Reply with quote

Thank u Frank... The job went Great icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top