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



In order to use /free the shop has to be on RPG IV, of course. That may be only a minor transition if they are basically only writing III-like code (no subprocedures, no service programs, etc.). I suppose that some IV programmers still occasionally define field sizes in the C-specs.

The issue to me has always been maintainability (ever since I had to go back and "enhance" the trash I wrote during my first year). COBOL's procedure division, for example, is free form. The difference between it and RPG free form is that COBOL statements are terminated by a period (.) rather than a semi-colon (;). I once (1980, I think) had to fix a COBOL program on a System/3 where the original programmer had written it like The Great American Novel; i.e., end a statement (period), start the next statement on the same line. Just trying to read it was next to impossible; don't even think about inserting new lines.


The point being that, if one doesn't know how to design readable/maintainable programs in fixed format, one is probably going to botch them in free-format, too. But with the indentation and (almost) being forced to surrender indicators, RPG programs are more potentially readable and, thus, more maintainable. There are learning curves ("I could switch to fixed for this, but isn't there a BIF that'll do the same thing?") and old habits (and friends) to drop (like MOVE).

I put off doing free format for a long time; didn't see the advantage. Now it just irks me no end when I have to switch to fixed to put in the P-spec. Whenever I modify an older program, if it's still fixed, I use WDSc to convert it to free (Why, oh why, did I use all of those MOVE's?). One additional benefit (or drawback, depending upon one's point of view) is that my boss, who is a VB programmer, can review complex logic with me. As a math major, precedence is not a problem for him and some of our formulas get a bit hairy ("Uh, you missed a couple of parens; no wonder it's coming out 10% instead of 1%.") and easier to read (and did I mention maintainable?) in free vs fixed.

A suggestion: Run a pilot project. That is, give one programmer the task of learning and using free format for, say, a month. Someone that's warm (though not hot) to the idea and that has credibility with his peers. Years ago (mid 70's) the D/P manager wouldn't let me start using structured programming techniques that I had just read about ("We've got too much work to do to waste time."). My boss (his asst.) and I did it anyway and on a major project. The real payoff, of course, came in the testing phase and, years later, in the maintenance phase. Top-Down, structured programming methods soon became mandatory, not an option. What they call "proof of concept," I think.


        * Jerry C. Adams
*IBM System i5/iSeries Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
        615.995.7024
fax
        615.995.1201
email
        jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



Michael Ryan wrote:

It depends on the programmer. Of course, they can be forced into change, but
if not forced, some may never change. Others will look for every new thing
and try it, whether it makes sense or not. I've found that AS/400/iSeries/i5
programmers tend to stay with what's comfortable. Also, a lot of i5
programmers have only worked with RPG - exposure to other
languages/environments helps make one aware of possibilities.

On 10/12/06, Bob Dobrowolski <r.dobrowolski@xxxxxxxxxxxxxxxxx> wrote:
Lim,

Good luck.  You are fighting an old and common battle.  If the other
"programmers" can't see the benefit of the cleaner code, easier to use
op codes, and greater functionality and flexibility of free format, then
I feel sorry for them.  One thing that worked here was to show them how
much easier it was to code in free format with WDS cans RSE.  Maybe that
will work for you.  Good Luck.

--
Thanks,
Bob Dobrowolski
Sr. Programmer Analyst
Star Stainless Screw Co.
973-256-2300  x232
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai
Sent: Thursday, 12 October, 2006 10:24
To: RPG programming on the AS400 / iSeries
Subject: RE: free form RPG reference

Yeap.  I use local variable a lot.  But some programmers think that they
are confusing and useless.  For them, it ain't that hard to define a new
global variable and the "best" part is that the global variable is more
"powerful", you can access it from anyway in the program.

My problem is going to be how to come up with a proposal that has enough
ROI to out weight the "standard" or what majority of programmers in the
shop used to.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Michael_Schutte@xxxxxxxxxxxx
Sent: Thursday, October 12, 2006 9:10 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: free form RPG reference

My own experiences have shown that I can code programs faster in /free.
I don't have to worry about if I'm in the right column and can just code
away.

I know longer define key list on I/O operations.   I put the key right
on
the i/o statement.  for example    chain (field1:field2) somefile;  So
that
the next person coming in can see immediately what I'm chaining with,
without having to search for the keylist.




Dig in! Bob Evans New Knife & Fork Sandwiches - This much homestyle
goodness demands a Knife & Fork!


rpg400-l-bounces@xxxxxxxxxxxx wrote on 10/12/2006 10:05:31 AM:

Maybe RPG is mostly used in business world and in business "standard"
out weight anything that doesn't have any significant ROI.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai
Sent: Thursday, October 12, 2006 9:00 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: free form RPG reference

It always sound strange for me to use learning curve as an excuse to
request all developers to not use/explore new feature of a language
that the developer is supposed to master in.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jonathan Mason
Sent: Thursday, October 12, 2006 2:34 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: free form RPG reference

Hi Tom

How could this become a "management approval" item? How is it
different
from using an API that
became available for V5R1 or a new IBM command? Especially, how is
it
different from using a new
%bif or any other feature of a language?
It's very different because it has an impact on the whole RPG
programming department.  Use of a new %BIF or command can have an
impact
- I've been in a number of sites where new %BIFs weren't allowed
because of variations in operating system levels.

The change to free format RPG requires some degree of a learning curve
which by its nature will reduce the programming efficiency of the
programmer involved and there is also the problem of having to
maintain something you may not be familiar with.  A lot of places will
stick with fixed format RPG purely because that's what their
programmers know and is also what their packaged software is written
in.
I've worked at a number of sites in the UK and at one of them, a major
automotive company, a contractor had to ask for permission to code a
program in RPG IV simply to get around a field/record size limit.
That was 5-6 years ago and I doubt if there programming standards have
changed much since then.

Jonathan



--
This is the RPG programming on the AS400 / iSeries (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 AS400 / iSeries (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 AS400 / iSeries (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 AS400 / iSeries (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 AS400 / iSeries (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 AS400 / iSeries (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.