× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Would a for/endfor loop work best here for you?

C                       for        WrkRRN = 1 to RRN
C   WrkRRN    chain   SFL
C        ~do-stuff-here~
C                       endfor

That should be complete and easier to maintain.
 
---------------------------------
Booth Martin
http://www.martinvt.com
---------------------------------
-------Original Message-------
 
From: RPG programming on the AS400 / iSeries
Date: 10/13/05 12:24:17
To: RPG programming on the AS400 / iSeries
Subject: Printing a Subfile - Revisited
 
Hi All,
 
 
 
I have a new program that reads from a physical file and populates a
subfile.  I would like to use the contents of the subfile and print out
a report.
 
 
 
In my D-Specs, I have RRN 4 0 INZ and also WrkRRN Like(RRN).  In my
subroutine, I do this:
 
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.  I have checked the value of RRN when it
enters this subroutine, and the value of RRN is equal to the amount of
records in the subfile.  However, I believe that when this routine is
executed, it is already at the end of the recordset, and the details
aren't printed.
 
 
 
Does anyone have any ideas what might be wrong in this situation?
 
 
 
Thanks!
 
 
 
Brian.
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Brian Piotrowski
 
Specialist - I.T.
 
Simcoe Parts Service, Inc.
 
Ph: 705-435-7814 x343
 
Fx: 705-435-6746
 
bpiotrowski@xxxxxxxxxxxxxxx
 
-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
 
 
--
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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.