× 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.



Cycle, Cycle, Cycle?

It' doesn't matters, in V6R1 it seems we can do away with
the cycle, and hopefully that will be the end of this kind
of discussions :-).

On the other hand, the cycle is just another tool in the
bag of tricks, and its use or not doesn't make anyone a
better or not programmer (or more virtuous, or experienced,
or whatever). It all depends on the business problem at
hand and how you solve it.

(This from a old programmer, that has used (and sometimes
still uses) the cycle and looks forward to playing with
cycle-less programs in V6R1).

Regards,

Luis Rodriguez

--- rpg400-l-request@xxxxxxxxxxxx wrote:

------------------------------

message: 7
date: Wed, 12 Mar 2008 16:22:28 -0800
from: James Lampert <jamesl@xxxxxxxxxxxxxxxxx>
subject: Re: Need Some RPG Technical Questions

Lim Hock-Chai wrote:
Jeff - Actually, every RPG program uses default RPG
cycle regardless of
how files is open/close file. Obviously, when I say
cycle programming,
I mean "cycle" programming. Otherwise, James statement
about "Anybody
who would give that answer to "What is The Cycle good
for?" would be
better off using another language." would be
irrelevant.

I'm afraid I have to disagree.
1. You don't have to "use" The Cycle at all (and probably
no more than a
third of the RPG programs I've written, and considerably
fewer of those
I have a hand in maintaining) actually "use" it. You can
bypass it, by
either doing an explicit RETURN, or by explicitly raising
LR, or (as I
understand it, in the latest compilers) you can even
suppress it. The
only thing you CAN'T do is ignore it.

2. In a lot of cases, one uses RPG because it's the only
language
available, or because you're writing something that might
have to be
maintained by someone who doesn't necessarily speak a
language better
suited to the problem at hand, or because the only other
choice that
would work at all is ILE C, and database access from ILE
C is a royal
pain in the <equus asinius>. But if you can't recognize
situations where
using The Cycle can simplify a program, you probably are
better off
using another language.

You don't use every tool every day, but that's no reason
not to know
what the tools you have are good for, and how to use
them.

In my toolbox at home, I have a pair of flush-cut rail
nippers, even
though it's been over two decades since I've laid any
model railroad
tracks. They're not a tool I use every day, and if I
caught somebody
abusing their delicate edges to cut steel wire, I might
be inclined to
use them as a weapon, but every so often, when I need to
cut off a soft
metal or plastic rod flush and square, I reach for the
rail nippers.

--
James H. H. Lampert
Touchtone Corporation




Luis Rodriguez

IBM Certified Systems Expert
eServer i5 iSeries Technical Solutions


____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.