Adding month to a date
Posted: Mon Mar 26, 2012 1:25 pm
Hi,
I have an input file that consists of several records and I'm only interested in one of them.
So I use command
INCLUDE COND=(1,4,CH,EQ,C'1234')
to extract that record.
In position 5-12 there is a date in format (yyyymmdd) that differs from time to time.
So I want to add one month to that date-value and I want the day to be the first weekday of the new month, so it shouldn't be a saturday or sunday.
Let say that the date is 20120326 so the result I want in my output file should be:
FLD1,'20120402'
I think this can be done by using DFSORT.
Regards,
Mike
I have an input file that consists of several records and I'm only interested in one of them.
So I use command
INCLUDE COND=(1,4,CH,EQ,C'1234')
to extract that record.
In position 5-12 there is a date in format (yyyymmdd) that differs from time to time.
So I want to add one month to that date-value and I want the day to be the first weekday of the new month, so it shouldn't be a saturday or sunday.
Let say that the date is 20120326 so the result I want in my output file should be:
FLD1,'20120402'
I think this can be done by using DFSORT.
Regards,
Mike