The problem here is that when #COVERAGES = 0, you will still have done
one run of the loop. A better solution might be
/FREE
count = 1;
Dow count <= #COVERAGES; // Number of Coverages
{magic}
count +=1;
EndDo;
/END-FREE
Allthough, looking at this solution, the For-loop might be just as good
(or even better, since the accumulation of count is done automagically
in the For-loop).
Cor
-----Original Message-----
From: rpg400-l-bounces+cor.takken=logicacmg.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+cor.takken=logicacmg.com@xxxxxxxxxxxx] On
Behalf Of David Foxwell
Sent: woensdag 24 oktober 2007 8:48
To: RPG programming on the AS400 / iSeries
Subject: Re: FOR With No Index
/FREE
DoU count = #COVERAGES // Number Of Coverages
/END-FREE
----- Original Message -----
From: "Robert Munday" <rwmunday@xxxxxxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Sent: Tuesday, October 23, 2007 10:34 PM
Subject: RE: FOR With No Index
Matt,
-----Original Message-----
From: matt.haas@xxxxxxxxxxx
<<< If you don't want to use a field for the index, why not leave it
as a
DO loop? >>>
A `DO` is not allowed in /Free.
I'll create an index field. Thanks for the replies.
Robert Munday
Munday Software Consultants
Montgomery, AL
on assignment in Nashville, TN
--
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.
--
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.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
As an Amazon Associate we earn from qualifying purchases.