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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
No new posts Sort card to know that creation date ... DFSORT/ICETOOL 10
No new posts Rexx to read current Panvalet editor/... CLIST & REXX 0
No new posts Help with SORT - I need to validate d... DFSORT/ICETOOL 11
No new posts Date format correction using dfsort DFSORT/ICETOOL 3
Search our Forums:


Back to Top