Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
harisukumaran,
With PTF UK90025 for z/OS DFSORT V1R10 and PTF UK90026 for z/OS DFSORT V1R12(Oct, 2010), DFSORT now supports date arithmetic which can add/subtract days, months or years to a given date like shown below.
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
----+----1----+----2----+----3----+----4----+----5----+----
20081215
20081216
20081217
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC OVERLAY=(15:1,8,Y4T,ADDDAYS,+15,TOGREG=Y4T(-),
30:1,8,Y4T,SUBDAYS,+23,TOGREG=Y4T(-))
//* |
The output from the above job is
Code: |
20081215 2008-12-30 2008-11-22
20081216 2008-12-31 2008-11-23
20081217 2009-01-01 2008-11-24
|
For complete details of date arithmetic functions and other new functions see "User Guide for DFSORT PTFs UK90025 and UK90026" paper (sortugph.pdf) at:
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242 |
|