expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
That would depend on the sort product installed, and its PTF level, but let's face it, calculating a date of six years ago and coding it isn't going to be much of a task, is it. |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
trevor,
Here's a DFSORT job that will do what you asked for. Just substitute the starting position of your input date field for p (e.g. 21) in the OMIT statement.
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN DD *
OPTION COPY
INREC BUILD=(DATE1(-))
OUTREC BUILD=(C'TARGDATE,''',1,4,ZD,SUB,+6,EDIT=(TTTT),
5,6,C'''',80:X)
/*
//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
OMIT COND=(p,10,CH,LT,TARGDATE)
/*
|
|
|