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
 

 

Can DFSORT remove records over a year old?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Fri Apr 11, 2008 8:36 pm    Post subject: Can DFSORT remove records over a year old?
Reply with quote

I have a sequential dataset; FB/80.

Code:

RCD1   04/04/2007
RCD2   04/05/2008
RCD3   02/27/2007
RCD4   03/24/2008
RCD5   03/29/2008


I would like to be able to run these records through DFSORT removing any record that is over 1 year old from current date

Today is 04/11/2008. All records older that 4/11/2007 should be deleted.

Code:

RCD2   04/05/2008
RCD4   03/24/2008
RCD5   03/29/2008


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

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Apr 11, 2008 10:36 pm    Post subject:
Reply with quote

I believe this DFSORT job will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/80)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(81:14,4,ZD,ADD,+1,EDIT=(TTTT),85:8,2,87:11,2)
  OUTFIL OMIT=(81,8,CH,LT,DATE1),BUILD=(1,80)
/*
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Sat Apr 12, 2008 12:06 am    Post subject: Reply to: Can DFSORT remove records over a year old?
Reply with quote

Brilliant!!

The solution worked perfect.

Thanks 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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Wishing everyone a very Happy Diwali ... Rohit Umarjikar General Talk & Fun Stuff 1 Sat Oct 29, 2016 1:54 am
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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