|
Gary, The question was how is RESET effected by using INZ(*SYS) for a date field. And you are correct that RESET sets up the initial values for a field based on their content at the end of *INZSR. I know, and worked with the original developer of RESET, CLEAR and data structure initialization. So yes, if in addition to using INZ(*SYS) on a date field, you also change the field's value during the *INZSR, the value copied back into the field by a RESET operation will be the value specified in the *INZSR. To the point of the original question, RESET will not regenerate a new date or time value simply because a date or time field had *SYS as its default value. Bob Cozzi > -----Original Message----- > From: rpg400-l-admin@midrange.com > [mailto:rpg400-l-admin@midrange.com] On Behalf Of Gary Guthrie > Sent: Thursday, May 02, 2002 3:38 PM > To: rpg400-l@midrange.com > Subject: Re: Looking for better coding > > > Oops. Premature send. I think I've been hacked. Weird keys > doing weird things. Yikes... > > Anyhow, if what you mean by initial value is the first value > that the developer puts in the field (because a field's > initial value is the default for that type - e.g., character > is blank, numeric is 0, etc.), then that's not correct. It's > the value as it exists at the end of the *InzSr subroutine. > So if the first time the developer stores a value in the > field is in the C-specs outside the *InzSr, that value will > not be used for Reset. Instead, the default value for the > type (because it wasn't set by the developer in *InzSr) is used. > > Gary Guthrie > Senior Technical Editor, iSeries NEWS > > > Bob Cozzi wrote: > > > > The way RESET works (or at least the way it was designed) > was that it > > took a mirror image of the initial value stored in a field--made a > > copy of it--then moved it back when the RESET opcode is used. > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) > mailing list To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > >
As an Amazon Associate we earn from qualifying purchases.
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.