The default is used if there's no data for a given field...

RPG in this case is passing in '0001-01-01'...

If you where using SQL, or even a logical that was missing the field,
you'd see the default you expect.

HTH,
Charles


On Mon, Jun 25, 2012 at 4:48 PM, dale janus <dalejanus@xxxxxxxxxxxxxxxxx> wrote:
I have a file defined with DDS (it's a long slow process moving to DDL).
It has a date field defined as type L. The default value is current date,
I confirmed it as  shown in OPS NAV.

What I want DB2 to do is put in  today's date whenever I add a record.
What I get is 0001-01-01.

This is the kind of thing I would like to let DB2 handle.  Do I need to
make it a timestamp field for that to work?   Or change the definition
with OPS NAV to something else?

I guess I  can always update with current date in RPG, but I'm trying to
use some of these new shiny tools that are available.


---Dale




--
This is the RPG programming on the IBM i / System i (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 thread ...

Replies:

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

This mailing list archive is Copyright 1997-2020 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].