|
Sorry - that's wrong. D WrkRrn S Like(Rrn) means define Wrkrrn the same as Rrn that's all. There is no other connection between them. Change the logic as I suggested and see if that works Alan Shore NBTY, Inc (631) 244-2000 ext. 5019 AShore@xxxxxxxx "Brian Piotrowski" <bpiotrowski@simc To oeparts.com> "RPG programming on the AS400 / Sent by: iSeries" <rpg400-l@xxxxxxxxxxxx> rpg400-l-bounces@ cc midrange.com Subject RE: Printing a Subfile - Revisited 10/13/2005 02:42 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> 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 -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.