|
What he means I think is that you need to use the ACTUAL field name off the subfile record that you are using for your RRN so that it's value is set to 1, then 2, etc so that the chain works properly. Using LIKE just defines another field that has the same attributes. Ron Power Programmer Information Services City Of St. John's, NL P.O. Box 908 St. John's, NL A1C 5M2 709-576-8132 rpower@xxxxxxxxxx http://www.stjohns.ca/ ___________________________________________________________________________ Success is going from failure to failure without a loss of enthusiasm. - Sir Winston Churchill "Brian Piotrowski" <bpiotrowski@xxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 2005/10/13 04:12 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> cc Subject RE: Printing a Subfile - Revisited 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.