|
"Walden H. Leverich" wrote:
Are lot1 and lot2 in the db files? If so, are they sequential in the files? What would happen if you defined lotall as a 10 char field *based on the lot1 field. Working off the top of my head here, not sure it would work, but I'm thinking that the lotall field will then start at the same memory position as lot1 and cover both fields (provided they're sequential in the db).
No, wouldn't work. Fields being sequential in the db doesn't guarantee they are sequential in the program, since the fields would be defined as standalone fields. The only one way to guarantee that is to define the fields as sequential subfields in a data structure. The easy way to do that is to define an externally-described data structure. Unfortunately, without a ds, they do sometimes happen to be sequential, which leads to hard-to-debug and sometimes hard-to-fix problems when a recompile causes them not to be sequential. Lots of things could cause this to change - a compiler change, system change, a completely unrelated new field or new line of code in the program, etc.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.