Midrange News for the IBM i Community


Posted by: renojim
sql date failure
has no ratings.
Published: 08 Dec 2011
Revised: 23 Jan 2013 - 2187 days ago
Last viewed on: 17 Jan 2019 (4518 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

sql date failure Published by: renojim on 08 Dec 2011 view comments(3)

I have an sql table with four date fields. I set them to 0001-01-01. I run Pgm A that puts actual dates in some of the fields. Pgm B reads the table looking for dates that have been set to something other than 0001-01-01 by pgm A. I've run this thing 100's of times in dev w/o a problem. Put it in production, ran fine the first time. Second time, on FETCHING the first record, I get CPF5035-18 'There is data in a date, time, or timestamp field that is not valid'. It's the first date field in the first record, still set to 0001-01-01. I have datfmt (*ISO) on the pgm compile.

I don't see anything wrong with the data, it's as it has always been for hundreds of test iterations and 1 in prd. I'm stumped.

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS