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
 

 

current date minus 13 months

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: current date minus 13 months
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    Post subject:
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    Post subject:
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    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 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
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Add system date inside of a PS file a... pramitdas DFSORT/ICETOOL 5 Sun Aug 28, 2016 12:06 am


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