Flat out the only answer you need is readability.
Layout two programs... one in RPG/400 and one in free form with multiple level Ifs/Dow/Do/For. Indent the code in free-form properly and ask her where the ending end* are for each statement. Use one of those programs that had a ridiculously amount of END at the end in the RPG/400 code. Such as
C MOVE *ZEROS iy
C 1 DO 5 iy
C 15 IFEQ SOMEVALUE
C KEYLIST CHAIN FILE 99
C *IN99 IFEQ *ON
C .... DO SOMETHING
C ELSE
C *IN98 IFEQ *ON
C ... DO SOMETHING
C ELSE
C *IN97 *INEQ *OFF
C ... DO SOMETHING
C ELSE
C ... DO SOMETHING
C END
C END
C END
C END
C END
Versus
For iy = 1 to 5;
If Somevalue = 15;
Chain (KeyField1:KeyField2) FILE
If %Found(File);
// do something
ElseIf *In98 = *On;
// do something
ElseIf *In97 = *On;
// do something
Else;
// do something
EndIf;
EndIf;
EndFor;
Seems to me option two is better. You can easily debug without debugging especially if long variable names are used.
Also, I don't see why the programmer couldn't use what they are comfortable with...
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of sjl
Sent: Tuesday, April 12, 2011 11:36 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Reasons for using RPGIV
Booth -
I know you're getting old, but try to keep up here - I believe that you got
totally lost on this thread. Please re-read what I originally wrote.
I am having a philosophical discussion/argument with a fairly new full-time
employee who works for my client company. She has /never/ developed code in
free-form RPGIV, and today she expressed the belief that we should instead
be doing everything in RPG/400; essentially she is saying that there is
nothing in free-form RPG that we cannot already do in RPG/400.
I expressed a strong exception to that statement, and she challenged me to
list 5 compelling reasons why RPGIV is better than RPG/400. I'm already up
to around 20 reasons, but as Jon Paris has indicated it probably will not
change her mind even if I come up with 50.
As I explained in both my OP and a subsequent post, we already have a
substantial body of RPGIV fixed-and-free-form code already in production.
The rest of the developers (except one) in the shop have been developing
applications in RPGIV/free-form code for several years, so there is /no/
"long learning" process involved for anyone but /her/ in the context of this
discussion.
- sjl
Booth wrote:
The one compelling reason for her shop to start the long learning
process involved in bringing a shop's "native intelligence" up to speed,
in my opinion, is that I suspect the software firms offering written
with non-ILE RPG are no doubt looking seriously into converting.
Her shop has every possibility of being caught flat-footed when the new
version is finally shipped.
--
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.
________________________________
Notice from Bob Evans Farms, Inc: This e-mail message, including any attachments, may contain confidential information that is intended only for the person or entity to which it is addressed. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments.
As an Amazon Associate we earn from qualifying purchases.