Hi Doug,
Well, how would you have handled it if it was NOT a date type?
Traditionally, we always made date fields a numeric field, and would
PROGRAMATICALLY defer processing on fields where the value was still the
default initialized value (0 in the case of a numeric field).....
So, how does using a date field alter this? The answer is IT DOESN'T
change at all... Instead of
If ENDDATE = 0;
STATUS = 'ACTIVE';
EndIf;
You simply
If ENDDATE = d'0001-01-01';
STATUS = 'ACTIVE';
EndIf;
Of course, you *could* use null support to make the distinction between
"has a value" and "does not have a value", but this is not a trivial
change. Adding null support to an RPG application requires a great deal
of discipline, to ensure that all applications can handle null fields
appropriately. I would not recommend allowing nulls as a first step in
your database modernization project, since there's a great deal of work
involved...
Hth,
Eric DeLong
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Doug Palme
Sent: Tuesday, October 14, 2008 11:06 AM
To: Midrange Systems Technical Discussion
Subject: Interesting question and debate on ddl tables with date fields
thatwill not always have a value
I hope that subject description makes it clear. We are having an
internal
debate and discussion as we make the move towards sql tables and ddl
files; specifically using date data types.
An example, an employee file has two dates, HireDate and TermDate,
self
explanatory.....one is when the person is hired and the other is when
they
leave.
Obviously while they are an employee, they do not have a term date,
so how
do we handle that?
suggestions? comments? thoughts?
This transmission may contain information that is privileged,
confidential
and/or exempt from disclosure under applicable law. If you are not
the
intended recipient, you are hereby notified that any disclosure,
copying,
distribution, or use of the information contained herein (including
any
reliance thereon) is STRICTLY PROHIBITED. If you received this
transmission in error, please immediately contact the sender and
destroy
the material in its entirety, whether in electronic or hard copy
format.
Thank you.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.