|
Rajeev, RPG processes the display file as a file, i.e. there is a file pointer to the current record. When you do an update, the current record is updated and released. When you read a record from subfile A, that record is the current record and can be updated. But as soon as you read a record from subfile B, the record from subfile A is released and the record from subfile B becomes the current record. When you update that record, it is released. If, after that, you try to update the record from subfile, you get an error, because you released it by reading the record from B. Solution: like Joe Teff suggests, either do the update before you read any other record from the display file, or save the record number and chain before you do the update. Joep Beckeringh * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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-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.