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
 

 

To Eliminate records based on Date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: To Eliminate records based on Date
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    Post subject: Reply to: To Eliminate records based on Date
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    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Sep 25, 2009 6:00 am    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Sep 25, 2009 6:33 am    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Sun Sep 27, 2009 6:13 am    Post subject:
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:

http://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    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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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