× 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.



If you want to make sure that the current date is always set if a new
row/record is written, independent which interface is used, you may add a
Before Insert Trigger that overrides the date fields with the current date.
The trigger can be written in either RPG (or an other HLL) or SQL.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"


-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von dale janus
Gesendet: Monday, 25.6 2012 22:49
An: rpg400-l@xxxxxxxxxxxx
Betreff: When is date field (L) updated?

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





As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.