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



Hi, Reeve:

DFU, even when deselecting columns, isn't the same as your first example. 
The fact that YOU don't see the field doesn't mean that DFU doesn't.

However, if you use DFU against the LF you created, you'll be all set.

HTH

Dennis E. Lovelady






"Reeve Fritchman" <reeve@ltl400.com>
Sent by: midrange-l-bounces@midrange.com
01/13/2003 07:38 PM
Please respond to Midrange Systems Technical Discussion

 
        To:     "'Midrange Systems Technical Discussion'" 
<midrange-l@midrange.com>
        cc: 
        Subject:        Initializing a timestamp field when adding a record

I'm trying to get a timestamp field initialized to the current time 
whenever
I add a record with an ILE RPG program. 

 

Here's what the PF/LF DDS manual says (p. 44, V5R1 version) when 
explaining
the DFT keyword:

 

If you are defining a timestamp field, you must specify the default value 
in
the following format:

DFT('YYYY-MM-DD-HH.MM.SS.UUUUUU')

If the DFT keyword is not specified, the default value is the current 
time.

 

Here's what I'm doing:

      A            RDATS           Z 

      A                                      TEXT('Add timestamp') 

      A                                      COLHDG(' ' + 

      A                                             ' ' + 

      A                                             'Add timestamp') 

 

So I created a subset LF without the timestamp field in the format, added 
a
record with DFU, and the timestamp was there (the manual, p. 27, alludes 
to
this behavior).  I created a DFU application without the timestamp field 
and
added a record; the timestamp was not set.

 

Am I mis-reading or was it mis-written?  I'm mis-tified.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.