I'm not starting that holy war again, but here is an example.

Take a couple of tables that are of a Parent/Child relationship. Large tables, say, a million records for the parent, and 3 million for the child. These tables have their primary keys defined. Now write a program that reads in a do loop, running another do loop for the read of the child file in order to print some sort of report. Run the program and see how long it takes.

Now, if you can, write a matching record program to print the same report.

The Cycle/MR will outperform the Full Procedural program by orders of magnatude. I've done this numerous times when a accosted by an RPG newbie because he doesn't understand cycle programming.

You don't have to use Import in Java either. You subclass using the entire package. But you don't do you?

I'm done....

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Michael Ryan
Sent: Thursday, January 08, 2009 1:04 PM
To: RPG programming on the IBM i / System i
Subject: Re: FW: Niftiest thing(s) you have done in RPG ILE or /FREE

Why? What can I do in the cycle that I can't do without the cycle? How
does the cycle make the code more efficient? How does the cycle make
the code clearer to most folks? What's the advantage of using the
cycle?

And I'm not trolling...I've written (conservatively) a million
programs using the cycle back in the day.

On Thu, Jan 8, 2009 at 12:45 PM, Mark Walter <mwalter@xxxxxxxxxxxxxxx> wrote:
That's total bunk, brother. Sometime the cycle is the best tool for the job.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of sjl
Sent: Thursday, January 08, 2009 12:13 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: FW: Niftiest thing(s) you have done in RPG ILE or /FREE

Chris wrote:
As for ILE/RPG, the cycle is about as useful
as mammaries on a boar.

Chris -
I think I resemble that remark!
- sjl



--
This is the RPG programming on the IBM i / System i (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 IBM i / System i (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 IBM i / System i (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 ...

Follow-Ups:
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.