Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need records within the date range

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Need records within the date range
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 Moderator


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

PostPosted: Mon Nov 10, 2008 11:19 pm    Post subject:
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    Post subject:
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    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 How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us