I/P :
2014-10-30
O/P:
120901
I have used the below code to subtract three years from the input file. Let me know your suggestions please to subtract and populate the o/p in yymmdd format.
Code: Select all
SORT FIELDS=COPY
OUTREC BUILD=(DATE1-1095)
Code: Select all
SORT FIELDS=COPY
OUTREC BUILD=(DATE1-1095)
Code: Select all
SORT FIELDS=COPY
INREC OVERLAY=(1:DATEADD=(1,10,DT=(4MD-),-3,YEAR))
OUTREC BUILD=(3,2,6,2,9,2)
Code: Select all
SORT FIELDS=COPY
INREC OVERLAY=(1:1,10,UFF,ZD,LENGTH=8,
1:1,8,Y4T,SUBYEARS,+3,TOGREG=Y2T)
OUTREC BUILD=(1,6)
Code: Select all
//SORTIN DD *
DUMMY
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC BUILD=(DATE1-1095)
OUTREC BUILD=(3,6)
/*