|
Hi Al, Thanks for the info. I think I already do this as well with my WrkRRN variable. In my D-Specs, I have this: D Rrn S 4 0 INZ D WrkRrn S Like(Rrn) D Rrn_max S 4 0 INZ So when I do my code, I use: WrkRrn = 1; DoW WrkRrn < Rrn_Max; Chain WrkRrn SPODATA; ...etc... That does cover off the issue, correct? Brian. -----Original Message----- From: Alan Shore [mailto:AlanShore@xxxxxxxx] Sent: Thursday, October 13, 2005 2:35 PM To: RPG programming on the AS400 / iSeries Subject: RE: Printing a Subfile - Revisited When you chain through the sub-file, don't you need to use RRN (the relative record number associated with the subfile)? As RRN was the last record written, the chain would get the last record written Change your logic to the following NOTE as you create the sub-file, save the RRN to another field (as suggested previously e.g. RRNMAX) then Rrn = 1; Write heading; DoW Rrn < Rrnmax; Chain Rrn MySubFile; .. process .. Write Detail; Chain Rrn MySubFile; Enddo
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.