Nancy,

What Vern said (though either a little too verbose or abbreviated for my
tastes).

But to summarize: Free-format RPG is similar to Cobol - except that (thank
God!) you have to start each statement/op-code on a new line. It is much
easier to read, etc. My ex-boss, a VB programmer, used to refuse to look at
my code (RPG, nothing personal) until I converted to free-format ("Well,
finally, I can read that.").

There are a couple of good books on Free-format by James Martin at
MCPressOnline.com .

In WDSc (and, I presume, RDp) there is a built-in converter that will change
Fixed-format to free-format. Though generally it looks pretty nasty if you
have a lot of MOVEs, Z-ADDs, etc., which have no direct equivalent in
free-format.

But it is possible to mix fixed- and free-format in a single program. I
have often had to modify a program (who hasn't?) and plugged the fix in
using free-format (usually a subprocedure, but that's not necessary).

Free-format is easier to read/write. And, I hear, via a PTF for 6.1 (may be
wrong about that, just working from bad memory cells) and 7.1 even the D-
and F-specs can be coded in free-form (though before that only the Calcs
were so enabled).

The RPG manual even gives its examples in both fixed- and free-format, where
applicable; it doesn't (to my recollection) show you how to change a MOVE,
MOVEA, or Z-ADD to free-form. Many of those things have been replaced by
(in whole or part) by the BIFs (Ch. 22, I think).

In summary, if you have ever done extend-Factor 2 coding, you'll love how
much easier it is in free-form!

Jerry C. Adams
IBM i Programmer/Analyst
Every great idea I have gets me in trouble.

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.