I am using
in my spec for dates. I call them true dates because we commonly use decimals for dates as well.
I created a program to maintain a file, which recently I went back and added some more date fields, again using 'true' dates.
The problem is that when I open a pre-existing item from the table, using a chain, I get errors becase the year portion on the date isn't in the correct year.
So, I tried using MAPVAL, with 01/01/40, 01/01/1940, with a combo of *BLANKS and *ZEROS.
I then tried to check to see if the date was blank or zeros, or
and I can't get the program to compile.
My question is, how do I not read a blank date from the file if it exists? How can I either check for it during the chain, or override the blank with something in the DDS.
Thanks!
Adein
Code:
A S2CMDT L B 21 23DSPATR(CS) A DATFMT(*MDY)
I created a program to maintain a file, which recently I went back and added some more date fields, again using 'true' dates.
The problem is that when I open a pre-existing item from the table, using a chain, I get errors becase the year portion on the date isn't in the correct year.
Code:
The year portion of a Date or Timestamp value is not in the correct range
I then tried to check to see if the date was blank or zeros, or
Code:
if mydate = d'01/01/40'
My question is, how do I not read a blank date from the file if it exists? How can I either check for it during the chain, or override the blank with something in the DDS.
Thanks!
Adein
Comment