We've just installed 5.0 on an Amdahl running UTS, and a piece of code
that's been working fine for a couple of years under 4.0 is now giving
us a strange error.
For the following code:
#include <sys/types.h>
#include <time.h>
CalTime(time_in, jdate, time_out)
time_t *time_in; /* time value */
long *jdate; /* returned date */
char *time_out; /* returned time */
{
int rslt; /* result field for rdefmtdate() */
char datestr[80]; /* buffer for function cftime */
[ some code that results in the string "Mar 10 1993" in array datestr ]
rslt = rdefmtdate(jdate, "mmddyyyy", datestr);
[ some code that checks rslt, and does more things with an intermediate
date/time string ]
}
...we get a return value of -1228 from rdefmtdate().
-1228 is not a documented return code for that subroutine, and the 5.0
error manual describes -1228 as a 4GL error having nothing whatsoever to
do with dates. As stated in the above code fragment, we were verifiably
getting the string "Mar 10 1993" in the datestr[] array.
The 5.0 ESQL/C manual shows no change to the arguments passed to/from
rdefmtdate(), and the code still runs OK on Suns running 4.0 and 5.0 and
on two other UTS systems running 4.0.
Anybody have any ideas?
-Rich