If my date field is not an index or a segment field, is it possible to store null value in it?
If yes, how?
I'm not sure a 'null' date makes sense. I'm not sure how you'd search for it, if you had to.
Maybe it's better used as a string field.
-JD.
Strange enough I have some customer, when doing a arsdoc get for some migration, they get a NULL date on date fields.
Causing problem with arsload.
Apparently some old version of CMOD was less strict in accepting such formats...
But today, if you want NULL dates, then the only way is either use string field, OR if you want to keep the date field, then to define that a NULL date is 01.01.1970 (CMOD < V9.0) or 01.01.01 / 31.12.9999 (CMOD V9+).
Sincerely yours,
Alessandro
In this particular case, we have 3 different dates. One of the dates that could be null in some cases is not used as a search field.
So we would probably make it a string field.
Alessandro
I didn't get your point when you said
if you want NULL dates, then the only way is either use string field, OR if you want to keep the date field, then to define that a NULL date is 01.01.1970 (CMOD < V9.0) or 01.01.01 / 31.12.9999 (CMOD V9+).
Does this mean, i need to write some extra logic or probably use the default in Application and put the default date as 01.01.1970 (CMOD < V9.0) whenever I encounter a blank or invalid date in data?
That's exactly what he means. You have to put in SOMETHING, so you might as well put in a date that 'approximates' zero. On CMOD versions older than v9.0, the earliest date it can store is January 1st, 1970. In CMOD v9, that date is January 1st, year 0001.
Here's more info on date formats in v9.0 if you're interested:
http://www-01.ibm.com/support/docview.wss?uid=swg27036188
-JD.
Well Justin is reading correctly my mind :-)
Hi all experts,
It has been almost 3 years since this post last updated. I am just wondering whether the answer is still the same or newer version of CMOD provides a way to store NULL on date field.
Thanks in advance.
-jw
Quote from: jw on July 19, 2016, 05:06:34 PM
Hi all experts,
It has been almost 3 years since this post last updated. I am just wondering whether the answer is still the same or newer version of CMOD provides a way to store NULL on date field.
Thanks in advance.
No, even with the newest V9.5.0.X
And I don't think it will ever be possible.
If you require it, then please define precisely your use case, and poste in the "Enhancement" forum, or request to IBM a new feature for your use case.
But really, it doesn't make sense to store null dates in CMOD. It's an archive, and an archive is mostly pointless if you can't reliably search it. Having any field with a NULL in it makes it difficult to find -- especially a date field, which is strictly formatted.
-JD.
Alessandro, Justin
Thanks for the info.
-jw