× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



So how will be solve the Y2.8K problem? Should we start now? Or is it the Y2.9K problem?

On 9/24/2015 2:05 PM, Jon Paris wrote:
Well danged if you’re not correct!

For some reasons I was convinced that the limit was 2899 - but now that I can check the docs I see that is the limit for the *Cxxx type fields - the real dates can indeed go to 9999. My apologies.


On Sep 24, 2015, at 10:31 AM, Luis Rodriguez <luisro58@xxxxxxxxx> wrote:

Jon,

'9999-12-31' IS a valid value for a date, either in SQL or in RPGLE. In the
latter case, it is valid as long as you are using one of the following
formats: ISO, *USA, *EUR, *JIS, *LONGJUL .

Regards,

Luis

Luis Rodriguez

--


On Thu, Sep 24, 2015 at 9:53 AM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:

Only problem with this Charles is that (unless things have changed and I
missed it) 9999 is not a valid year for a date. You’ve have to use high
val to achieve an equivalent effect.


On Sep 24, 2015, at 9:18 AM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:

I blame Oracle...

https://stackoverflow.com/questions/203493/why-does-oracle-9i-treat-an-empty-string-as-null
Not that I'm against NULLs...I'm very much for them. But they need to be
used carefully and only where they make sense.

For instance, in the OP's case, for an expiration date, I'd wouldn't use
them. I'd just set the date to 9999-12-31. I don't really need a
contract
that doesn't expire. Having it expire when time does is good enough. ;)

In the case of most character fields, you don't usually really need to
differentiate between UNKNOWN and BLANK/EMPTY.

The one place NULLs really come in handy, is numeric fields that you
intend
to use aggregate functions on. AVG(2,2,NULL,2) is 6 / 3=2 not 6 / 4 =
1.5.
Of course, that assumes you want 2 as a result and not 1.5. :)

I think many developers overuse NULL, as DBMS' default to NULLABLE.

Charles

On Wed, Sep 23, 2015 at 6:12 PM, Vernon Hamberg <
vhamberg@xxxxxxxxxxxxxxx>
wrote:

Just to throw something into the fray that is really a non-winning
attempt, but I'll do it anyway!

NULL - it is not really a value, it is an attribute. That's why the null
indicators make some sense - it's either true or false that the value of
something is known. Not that this makes things easy.

When columns are nullable, the row in storage has a bit array (I think -
maybe a byte array) up to 8000 long - the maximum number of columns in a
record.

There is no test in SQL for FIELD = NULL - the test is FIELD IS NULL.

The COALESCE function is always described as "...returning the 1st
non-null expression among it's arguments..." I suggest that "non" is a
test
for "is", not "equals".

I really do think that if we remember this distinction, that things can
be
a little less confusing. As Charles says, you can't say a comparison is
true or false when a column could BE NULL in some rows.

The trouble with this position is, even IBM in its documentation talks
about a column having the NULL value - I think! Even people in this list
find this to be common usage.

Anyhow, there I sit - ready to to be knocked off my NULL position on the
fence into either the TRUE or FALSE side - hope it's greener, wherever I
land!


--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

Jon Paris

www.partner400.com
www.SystemiDeveloper.com

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

Jon Paris

www.partner400.com
www.SystemiDeveloper.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.