Author: Arun Raj
Subject: Reply to: How to pass the previous month date in include condition
Posted: Mon Oct 31, 2016 7:34 pm (GMT 5.5)
You could either do something like this, or use the same date functions and build symbols as Bill suggested in your duplicate topic.
SORTOUT :
OR if you have no issues working with 2-digit years, something like this:
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard
Subject: Reply to: How to pass the previous month date in include condition
Posted: Mon Oct 31, 2016 7:34 pm (GMT 5.5)
You could either do something like this, or use the same date functions and build symbols as Bill suggested in your duplicate topic.
Code: |
//STEP01 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD * 2016-09-16 2016-09-17 2016-09-18 2016-10-17 2016-10-18 2016-10-19 //SORTOUT DD SYSOUT=* //SYSIN DD * SORT FIELDS=COPY OUTREC OVERLAY=(81:1,4,6,2,9,2, 89:DATE2-1,95:C'17',DATE2,103:C'18') OUTFIL INCLUDE=(81,8,CH,GE,89,8,CH,AND, 81,8,CH,LE,97,8,CH), BUILD=(1,80) |
SORTOUT :
Code: |
2016-09-17 2016-09-18 2016-10-17 2016-10-18 |
Code: |
//SYSIN DD * SORT FIELDS=COPY OUTREC OVERLAY=(81:3,2,6,2) OUTFIL INCLUDE=((81,4,Y2T,EQ,Y'DATE2'-1,AND,9,2,ZD,GE,17),OR, (81,4,Y2T,EQ,Y'DATE2',AND,9,2,ZD,LE,18)), BUILD=(1,80) |
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard