View previous topic :: View next topic
|
Author |
Message |
Sailaja Sankisa
New User
Joined: 12 Mar 2010 Posts: 4 Location: hyderabad
|
|
|
|
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 |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
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 |
|
|
Sailaja Sankisa
New User
Joined: 12 Mar 2010 Posts: 4 Location: hyderabad
|
|
|
|
Hi Kolusu,
Thank you very much for the solution. |
|
Back to top |
|
|
|