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

To Eliminate records based on Date


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

New User


Joined: 23 Mar 2007
Posts: 35
Location: pune

PostPosted: Fri Sep 25, 2009 5:13 am
Reply with quote

I have requirement to get records which are greater than a certain date which is in the format of mm/dd/yyyy

For e.g first 10 bytes corresponds to date and next transaction , i want to get the rows have date greater than 01/01/2006

10/01/200599923
09/22/200797861
09/22/200720324

Please let me know
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Sep 25, 2009 5:30 am
Reply with quote

thunderstorm,

Try this . I assumed that your input is FB recfm and 80 bytes in length

Code:

//STEP0100 EXEC PGM=SORT                               
//SYSOUT   DD SYSOUT=*                                 
//SORTIN   DD *                                       
10/01/200599923  - DROP                               
09/22/200797861  - PICK                               
09/22/200720324  - PICK                               
02/01/2006       - PICK                               
01/01/2006       - DROP                               
//SORTOUT  DD SYSOUT=*                                 
//SYSIN    DD *                                       
  SORT FIELDS=COPY                                     
  OUTREC OVERLAY=(81:7,4,1,2,4,2)                     
  OUTFIL INCLUDE=(81,8,CH,GT,C'20060101'),BUILD=(1,80)
//*
Back to top
View user's profile Send private message
thunderstorm

New User


Joined: 23 Mar 2007
Posts: 35
Location: pune

PostPosted: Fri Sep 25, 2009 5:45 am
Reply with quote

is to possible to use any DATE1 function to do it ?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Sep 25, 2009 6:00 am
Reply with quote

Hi,

what do you mean by
Quote:
is to possible to use any DATE1 function to do it ?


Do you mean instead of coding 20060101 ?

Gerry
Back to top
View user's profile Send private message
thunderstorm

New User


Joined: 23 Mar 2007
Posts: 35
Location: pune

PostPosted: Fri Sep 25, 2009 6:17 am
Reply with quote

I meant we have functions like DATE1, Y2W etc. for manipulations on date formats.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Sep 25, 2009 6:33 am
Reply with quote

Hi,

what's wrong with the manipulation that has been provided ?


Gerry
Back to top
View user's profile Send private message
thunderstorm

New User


Joined: 23 Mar 2007
Posts: 35
Location: pune

PostPosted: Fri Sep 25, 2009 6:35 am
Reply with quote

i just wanted to know if there is a way we can do using DATE1 function.
There is nothing wrong in the original solution..but wanted to know if its possible via functions.
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: Sun Sep 27, 2009 6:13 am
Reply with quote

Did you bother to look up the DATE1 function. It's for the current date. If you want to compare a date based on the current date, you can use DATEn, DATEn+d or DATEn-d. But you asked how to compare to a specific date so that's the solution you were given. Please read the DFSORT books to find out what specific functions do. You can find all of the DFSORT books at:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top