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



I once worked at a company that was real proud that they used "structured programming" methods. Until, that is, I had to do maintenance on what they called "The Mother of All Programs." Over 2000 lines of code - and nearly all of it mainline; forget subroutines, much less subprocedures. I gave up tracking the nests (it was fixed format) at 50! The senior programmer wasn't very enchanted with me when I pointed out that this was lousy design, after all he had a CDP. When I suggested that we convert one of their common (and very important) functions, which was hard-coded in about 13 programs, to a service program or, at the very least, a subroutine imported using a /Copy, that went over like a lead balloon.

I definitely like being the lead (albeit the only) System i programmer here.

Jerry C. Adams
IBM System i Programmer/Analyst
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rick baird
Sent: Friday, January 09, 2009 7:39 AM
To: RPG programming on the IBM i / System i
Subject: Re: Good places to use "The Cycle" in today's RPG was->Re: FW: Niftiest thing(s) you have done in RPG ILE or /FREE

I disagree about iter and leave, but that's personal preference.

On Fri, Jan 9, 2009 at 7:04 AM, <GUY_HENZA@xxxxxxxxxxxxxx> wrote:
I was taught structured programming in 1980 and I have never written a new
program with a GOTO, ITER or LEAVE. I consider them to be poor program
design.

Regards,

Guy
Inactive hide details for "James Perkins" <jrperkinsjr@xxxxxxxxx>"James
Perkins" <jrperkinsjr@xxxxxxxxx>

"James Perkins" To "RPG programming on the
<jrperkinsjr@xxxxxxxxx> IBM i / System i"
Sent by: <rpg400-l@xxxxxxxxxxxx>
rpg400-l-bounces@xxxxxxxxxxxx cc
Subject Re: Good places to use
01/08/2009 03:26 PM "The Cycle" in today's
RPG was->Re: FW: Niftiest
+---------------------------+ thing(s) you have done in
| Please respond to | RPG ILE or /FREE
| RPG programming on the |
| IBM i / System i |
| <rpg400-l@xxxxxxxxxxxx> |
+---------------------------+

While I agree that GOTOs are not required in cycle programs, I have
probably
only seen a handful of cycle programs that did not use them. There is
usually always some record you don't want.

Usually when I find cycle programs that do not have GOTOs, it's because
they
are some kind of work file.

Personally I find the ITER or LEAVESR can always replace a GOTO, if and
only
if it's not a cycle program ;-)

James R. Perkins

On Thu, Jan 8, 2009 at 11:50, Booth Martin <booth@xxxxxxxxxxxx> wrote:

> GOTOs have nothing to with the cycle.
>
> Also, GOTOs are pretty handy if there are no exsr, begsr, and endsr
opcodes
--

-------------------------------------------------------------------------------
The information contained in and transmitted with this e-mail may be
privileged, proprietary, confidential and protected from disclosure. No
privilege is hereby intended to be waived. This e-mail is intended only
for the person to whom it is addressed. If you are not the intended
recipient/addressee, any use of the e-mail and/or its contents, including,
but not limited to, dissemination, distribution or copying is strictly
prohibited and may be unlawful, and you must not take any action in
reliance on it. If you receive this e-mail in error, please immediately
notify the sender and delete the original message and any copies of it
from your computer system. We deny any liability for damages resulting
from the use of this e-mail by the unintended recipient, including the
recipient in error.

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