[Migrated content. Thread originally posted on 03 December 2010]
We are querying vision files thru acuxdbc 8.1 with ms sql 2008. When we try to query a date field (xfd directive defines as a date field MMDDYY, in fd it is pic 9(06) comp-6) we receive an error such as:"An error occurred while executing batch. Error message is: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM."
if the date field has a value of zero. (The zero value is valid in cobol world.) If the field was non-comp, just a pic 9(06), there would be no problem - sql would just pull in as a null. If we were to rewrite the entire cobol data file using non-comp data for any date field that might have a zero in it, the problem does resolve - sql pulls in as a null. The problem with that is we have a huge file and hundreds of programs that would have to be recompiled.
Has anyone else had this problem or any ideas on how to resolve? :confused:



