Joined: 06 Jun 2008 Posts: 8214 Location: Dubuque, Iowa, USA
I just searched the COBOL Language Reference manual (link at the top of the page), and there were NO hits for "timestamp". Since the field type has to be a COBOL format, why don't you give us more details -- such as the precise PICTURE clause for the data field since we know it will not be "PIC TIMESTAMP" -- and we can provide some help.
DB2 has a format for "timestamp". SMF has a different format for "timestamp". I'm sure there are others -- so "timestamp" does not even have a standard format.
extract the date part from the timestamp and ..
perform the proper computations
rebuild the timestamp!
look at the CEEDAYS and CEEDATE LE callable functions
CEEDAYS will convert a date to an absolute number
CEEDATE will convert back to a date
the logic... ( only the logic )
new_date = CEEDATE(CEEDAYS(old_date)+90)
look at the manuals for the exact syntax
Joined: 14 Jan 2008 Posts: 2504 Location: Atlanta, Georgia, USA
After you post your timestamp format, review COBOL INTRINSIC FUNCTIONS. The minimum version/release must be COBOL/370. If you really mean a datestamp, the format can be YYYYMMDD (Gregorian) or YYYYDDD (Julian).
If you are running COBOL2 or even OS/VS COBOL ( ), then Language Environment must have been installed in your LPAR. If this is true, then follow Enrico's advice.
The LE Callable Service routines will return you a "Feedback Code", which indicates success/failure of the CALL.
Unfortunately, INTRINSIC DATE FUNCTIONS expect the passed-date to be valid. Otherwise, for invalid passed-dates, you'll crash and burn....