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 How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm


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