|
You could easily do it with: SetLL 1 subfile; Read subfile; Dow not %eof(subfile); Code to print the subfile record Read subfile Enddo; -----Original Message----- From: Fisher, Don [mailto:dfisher@xxxxxxxxxxxxx] Sent: Thursday, October 13, 2005 1:33 PM To: 'RPG programming on the AS400 / iSeries' Subject: RE: Printing a Subfile - Revisited Is that all the code? It seems like there should be another CHAIN after adding 1 to Wrkrrn. I usually write these routines with DOW Wrkrrn < NumberOfRecordsInSubfile and place the CHAIN inside the DOW loop. Aside from being intuitive, it eliminates all those "Subfile record not found" messages in the job log. Hope that helps. Donald R. Fisher, III Project Manager Roomstore Furniture Company (804) 784-7600 extension 2124 DFisher@xxxxxxxxxxxxx <clip> Wrkrrn = 1; Write heading; Chain wrkrrn mysubfile; Dow %found(mydisplay); ... process ... Wrkrrn = Wrkrrn + 1; Enddo; However, the system automatically jumps over the DoW statement and doesn't print out any details. <clip> -- 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.