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

current date minus 13 months


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

New User


Joined: 12 Mar 2010
Posts: 4
Location: hyderabad

PostPosted: Fri Mar 12, 2010 4:36 pm
Reply with quote

Hi,

Refering to Sort to include date check for mmddyy format

I have a FB file of length 300 that has a date in 81:10 in the format mm/dd/yyyy.

I need to extract all records with date greater than current date - 13 months.

I tried doing this by first converting the date to yyyymm format and then used (81,10,CH,LT,DATE2-13).

Can this be done in a single step?

Thanks.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Fri Mar 12, 2010 10:19 pm
Reply with quote

sailaja,

SORT products do not have the capability of subtracting months from the current date. If you are ok validating the year and month then the following DFSORT control cards will give you the desired results

Code:

//SYSIN    DD *                                         
  SORT FIELDS=COPY                                     
  OUTREC OVERLAY=(301:87,4,81,2)                       
  OUTFIL INCLUDE=(301,6,CH,LT,DATE2-13),BUILD=(1,300)   
//*
Back to top
View user's profile Send private message
Sailaja Sankisa

New User


Joined: 12 Mar 2010
Posts: 4
Location: hyderabad

PostPosted: Mon Mar 15, 2010 12:02 pm
Reply with quote

Hi Kolusu,

Thank you very much for the solution. 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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Changeman - how can we know the curr... Compuware & Other Tools 2
Search our Forums:

Back to Top