|
Jim Langston wrote: > An example... > > Say I have a screen display that utilizes fields from a file, in this > case I would use the external DS. The user enters information into > this screen, which changes the data structure. When the user presses > enter say I want to validate this data and make sure they are not > duplicating data in another record. Currently I would have to save > a copy of the buffer then read through my records and do validation, > and then restore the buffer and write it. > I hope you're not implying that you use the same field names in the device files as in the database files? If not I can't see why you should need to save the display fields in a DS. > With this new method, I would not have to save the buffer, but would > just read the file into another data buffer and do my checking on > that, then when I was finished I could simply write my data buffer > that is shown on the screen. > > Many times I have found myself having to save record data buffers > into a temp buffer so I could check other records in a file. It > has always been a pain to code and prone to bugs if I forget a > variable or two. This way would be much easier, IMO. > I use setll and/or service program procedure to check against records in database files. "Normally" no need to do "inline reading" and overwrite buffers. No big deal really, if you find it useful, please use it. I just can't think of one program I've ever needed this after converting to ILE. Maybe it's too late in the evening :)
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.