Re: Write to db containing values defined by DB2
"M. Lazarus" <[email protected]> Fri, 17 Sep 2010 11:17:25 -0400
| Newsgroups | gmane.comp.lang.as400.mi |
|---|---|
| Message-ID | <[email protected]> |
There are obviously other ramifications to fully enable this feature, but as a start, I'd like RPG to allow DB2 do its thing, when requested to do so: Put field defaults into the field automatically when adding a record. At 9/17/2010 10:51 AM, you wrote: >On 9/16/2010 5:38 PM, M. Lazarus wrote: > > Barbara, > > > > I was hoping that it wouldn't work that way, but thinking about the way > > RPG handles initializations, that behavior makes sense. I wonder if an > > additional keyword value would be in order, e.g. INZ(*CURRENT) or > > INZ(*CURRENTADD). > > > > -mark > >That wouldn't really fit with the notion of "initialization". > >But aside from that, the problem is when to update the timestamp. Every >time the subfield or data structure is used? What if it's passed as a >parameter - assuming the callee is another RPG procedure, should it know >that the timestamp field has to be updated before it's used? > >Just thinking aloud now ... one way to do this would be to have a >special value in the actual timestamp field like "*CURRENT". Then, >whenever the timestamp was evaluated it would use the current timestemp. > Date, time, and timestamp fields would have to be tagged with >something like ALWCURRENT(*YES), so that an assignment could copy over >the "*CURRENT" rather than just assigning the then-current timestamp. _______________________________________________ This is the MI Programming on the AS400 / iSeries (MI400) mailing list To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/mi400 or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/mi400.