|
Dave, Doug said: >> Subfields are not pointers per se, they just have addresses within the >> address space for the DS as a whole. Dave said: >If that is the case, then how do you account for a field from a file that >is "sub divided" in a DS? (snip) >In this case, a portion of the DS is altered, and the updated Acct# is >written to MasterFile. I thought that the Acct# DS had a pointer to >the I/O buffer where MasterFile is read from & written from. >If pointers aren't used, how does this the change in the DS show >up in the change in the file? All fields are stored in memory separate from the I/O buffer. The fields are not pointers to within the buffer space. After a record is read, each field is moved from the buffer to the field's memory space. The opposite happens when a record is written. First the fields are moved to the buffer, then the buffer is written. If you have ever run a program in debug and tried to step into a disk I/O operation, that is why you need to step over each field's movement to/from the buffer. This can by suppressed in RPG IV by using the H-spec keyword Option( *NoDebugIO ), but is the default behavior. So if you have a DB field as part of a DS, then overlay a portion of the field, the DB field is copied to the buffer prior to the write and the disk record reflects the overlay. Doug * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is the RPG/400 Discussion Mailing List! To submit a new * * message, send your mail to "RPG400-L@midrange.com". To unsubscribe * * from this list send email to MAJORDOMO@midrange.com and specify * * 'unsubscribe RPG400-L' in the body of your message. Questions should * * be directed to the list owner / operator: david@midrange.com * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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.