IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can DFSORT remove records over a year old?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Fri Apr 11, 2008 10:36 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top