View previous topic :: View next topic
|
Author |
Message |
saubhik
New User
Joined: 21 Sep 2007 Posts: 35 Location: kolkata
|
|
|
|
can anyone tell me how to calculate the date of 1 months back in cobol from current date.
example:
suppose i have a field current-date in my input file.i have to change this date to 1 month previous date and write that date into a file.how can i do that?
thanks,
saubhik |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
saubhik
New User
Joined: 21 Sep 2007 Posts: 35 Location: kolkata
|
|
|
|
thnks..but if i want do it in a simpler way...using cobol DATE routine
or inbuild functions..please suggest.. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Just remember that some months are 30 days, 31 days, 28 days, or 29 days. That makes it rough when you have to use days for the calculations. Check and see if your site has a standard date calculation routine. I developed one in assembler to be called from cobol many years ago, it sure saved a lot of trouble. I received a lot of late night calls from idiots that passed bad data then got bad results and tried to blame me. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
|