|
Hi Dan, I'm quite sure this problem is covered in the redbook: Chapter 7.8.5 Updating or deleting rows using a cursor Steps: 1. Declare cursor with "For Update of ListFieldsForUpdate" 2. Open Cursor 3. Fetch Record 4. Print your row, modify the fetched data with RPG or what ever you want 5. Update the fetched record by specifying "where current of CursorName" Birgitta -----Ursprüngliche Nachricht----- Von: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Dan Gesendet: Mittwoch, 13. Juli 2005 19:19 An: Midrange Systems Technical Discussion Betreff: SQLRPGLE example of Fetch, use data for report, then Update Major brain fade here... Is it possible to use embedded SQL that will fetch data, let RPG use the fetched data, then modify & update the data with SQL Update? I need to print an audit report of the records being updated with the original values before updating them. If someone has an example, I'd love to see it. BTW, I found the reference to the redbook "Modernizing IBM eServer iSeries Application Data Access - A Roadmap Cornerstone" from a post few weeks ago -- excellent resource! (But didn't answer this question that I could see.) And I just now discovered the Accelerator Keys in the archives!!! AWESOME! Now I can keep my fingers on the keyboard!!! TIA, Dan
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.