I generally use *loval (0001-01-01) to denote "blank date".
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Friday, May 16, 2008 12:55 PM
To: RPG programming on the AS400 / iSeries
Subject: Date fields was: Quick question on indicators - more
philosophicalthan anything else
I still see new tables created here with 8 digit dates instead of true
date fields. Really torks me when this same column needs a lot of
duration calculations and the first thing you always end up doing is
converting it to a date.
One person pointed out that certain numbers are useful for meaning
things like "no due date selected yet" and other special functions. I
argue that you could use a null date or reserve certain dates for
restricted usage, like a New Years date from 200 years ago means ...
And let's put some constraints on them. Like don't allow a birth date
more than 150-200 years ago.
Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
Doug Palme <DPalme@xxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
05/13/2008 05:59 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc
Subject
Re: Quick question on indicators - more philosophical than anything
else
Tommy,
Agreed and that would be the only exception.....Legacy code......
Nobody should ever write new files that have anything other than a date
/
time data type.
From:
Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx
To:
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Date:
05/13/2008 04:34 PM
Subject:
Re: Quick question on indicators - more philosophical than anything
else
unfortunate folks who inherited the database have to use them...or
rewrite
everything that touches the files. that's what i have to live with.
all
the new tables/files are created using DDL and time/date/timestamp
fields...no more fiddling with numeric (or worse character) date fields.
Thanks,
Tommy Holden
From:
Doug Palme <DPalme@xxxxxxxxxxx>
To:
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Date:
05/13/2008 04:14 PM
Subject:
Re: Quick question on indicators - more philosophical than anything
else
Joe,
Do not even get me started on dates......it is the biggest pet peeve of
mine why anyone is still using anything other than a date data type in a
file.....
From:
Joe Pluta <joepluta@xxxxxxxxxxxxxxxxx>
To:
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Date:
05/13/2008 04:06 PM
Subject:
Re: Quick question on indicators - more philosophical than anything else
Doug Palme wrote:
Is anyone still using the old indicator style of INKC, INKA, etc.?
I've almost entirely moved to using numbered indicators (CA03 03),
because then I can use an INDDS and then change them to named
indicators. Some folks prefer the INFDS approach, but I don't.
However, this is one of those few instances where I can't argue tooth
and nail for my position - I don't have a good reason why I prefer
numbered indicators over INFDS. I guess I like write (if ExitKey)
rather than (if key = Exit).
Is there any reason why this should even be used today?
Nope. I can't think of a good reason to use *INKx anymore. In fact,
the only indicator I can see ever showing up in a program is *INLR.
I know some are advocating using no indicators at all in a
program....but
is that not one of the strengths of RPG?
This is a philosophical point. Indicators were great for the original
RPG because space was at a premium and indicators allowed you to test
three conditions using only 9 columns. Way cool. But these days, the
very idea of a numbered indicator is just not justifiable. Named
indicators, sure - they're basically a set of Boolean flags you send
primarily to your user interface to interact with the user. But I can't
see any reason for numbered indicators any more than I can justify
2-digit years.
Joe
As an Amazon Associate we earn from qualifying purchases.