If you have 20020101 as an initial date, how would you increment the date one month at a time, while maintaining the "0" if the month is 01 through 09? I've thought of this approach, but there may be a simpler way:
01 TEST-DATE.
05 D-YEAR PIC X(4).
05 D-MONTH PIC X(2).
05 D-DAY PIC X(2).
EVALUATE TRUE
WHEN D-MONTH = "01"
MOVE "02" TO D-MONTH
WHEN D-MONTH = "02"
MOVE "03" TO D-MONTH
WHEN D-MONTH = "03"
MOVE "04" TO D-MONTH
ETC...
END-EVALUATE
Thanks, Dan.
01 TEST-DATE.
05 D-YEAR PIC X(4).
05 D-MONTH PIC X(2).
05 D-DAY PIC X(2).
EVALUATE TRUE
WHEN D-MONTH = "01"
MOVE "02" TO D-MONTH
WHEN D-MONTH = "02"
MOVE "03" TO D-MONTH
WHEN D-MONTH = "03"
MOVE "04" TO D-MONTH
ETC...
END-EVALUATE
Thanks, Dan.