Author: Arun Raj
Posted: Thu Sep 08, 2016 8:15 pm (GMT 5.5)
You can make use of the Y2W(mmddyy) or Y2T(yymdd) formats which takes care of the CC part during a date arithmetic with 6 byte date fields.
Here is the results from a sample test.
SORTOUT
Like Bill suggested, you can simply hard-code the date if this is a one-time activity and forget about the calculation. Also I'd use ICETOOL as Pandora suggested to put it in one step if you have 20 or more input AND output files.
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard
Posted: Thu Sep 08, 2016 8:15 pm (GMT 5.5)
You can make use of the Y2W(mmddyy) or Y2T(yymdd) formats which takes care of the CC part during a date arithmetic with 6 byte date fields.
Here is the results from a sample test.
Code: |
//STEP01 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD * ----+----1----+----2----+----3----+----4----+----5----+----6----+----7-- 07/09/16 01/03/16 01/01/00 //SORTOUT DD SYSOUT=* //SYSIN DD * OPTION COPY INREC OVERLAY=(81:4,2,1,2,7,2,81:81,6,Y2W,SUBDAYS,+1,TOGREG=Y2W, 15:83,2,C'/',81,2,C'/',85,2) |
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7-- 07/09/16 06/09/16 01/03/16 29/02/16 01/01/00 31/12/99 |
Like Bill suggested, you can simply hard-code the date if this is a one-time activity and forget about the calculation. Also I'd use ICETOOL as Pandora suggested to put it in one step if you have 20 or more input AND output files.
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard