Personally, I'd sort it to get the blanks together and then use the first one I found to quit the loop.

Unless you need the original sequence for some reason, in which case a count would also need to be added to be able to re-sequence.


Jon Paris
Jon.Paris@xxxxxxxxxxxxxx



On Nov 10, 2025, at 9:34 AM, David Gibbs via RPG400-L <rpg400-l@xxxxxxxxxxxxxxxxxx> wrote:

On Tue, Nov 4, 2025 at 1:30 PM Glenn Gundermann <glenn.gundermann@xxxxxxxxx>
wrote:

It sounds interesting. I'd like to know a real example of how you might
use this. What project do you have that this would come in handy for?


I can think of many situations where I've wanted to iterate through an
array only including specific elements.

Right now I'm working on a situation where I need to process an array that
has blank elements that I don't need to process.

Yes, I can test the element before processing it but, IMO, it would be
better to be able to get a subset of the array with the blank elements
excluded.

david
--
IBM i on Power Systems: For when you can't afford to be out of business!

I'm riding in the American Diabetes Association's Tour de Cure to raise
money for diabetes research, education, advocacy, and awareness. You can
make a tax-deductible donation to my ride by visiting
https://mideml.diabetessucks.net.

I may have diabetes, but diabetes doesn't have me!
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2025 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.