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



Hi Nancy

I think you are thinking of the difference between RPG III (RPG400 in your terms) and RPG IV. I'll start with that assumption

Some opcodes were slightly modified in RPG IV - usually made longer. Here is something from a manual on moving to RPG IV - "Some of the existing operation codes are renamed to improve
readability and better understanding of the program code."

1. In RPG III, the column width for opcodes is 5 and operation extenders like half-adjust are in a column immediately after the result column data type definition.

2. In RPG IV, the column width for opcodes is 10, which now includes room for the operation extenders. The max length of opcodes is now 6 (I think) instead of 5.

So an opcode like UPDAT in RPG III is now UPDATE in RPG IV.

According to that manual, only 15 opcodes were renamed - so BITOF became BITOFF - much more readable. EXCPT became EXCEPT. WHxx became WHENxx.

So that's enough on that. What about free format?

Well, the original RPG IV (V3R1 of the OS in 1995) had a start on free format with the H-spec. It also started out in C-specs with the extended factor 2, where free-format arithmetic and logical expressions are allowed - that column is 45 wide. It's used with the new opcodes like EVAL, IF, WHEN, DOU, & DOW. Things like IF allow much more freedom in stating the condition, compared to row upon row of IFxx and ANDxx and ORxx opcodes - I don't think I've consciously used any of those old constructions for years.

Now along comes full free-format calculation specs. What you do with these is specify only the operations. You don't have the result data-type columns, nor result-indicator columns. These latter items are done elsewhere, in D-specs (declaring of variables) and with built-in functions for things like the EQUAL status after SETLL or FOUND status after CHAIN or LOOKUP. It actually gets a much cleaner look. I know I never remember now which of the resulting indicators applies to which operation. Until I look at old code, so then I get a format line at the top of the editor in RDi - very cool.

Now to your supposition - actually, free-format has exactly the same opcodes as fixed-format. There will be differences in the order of things that were in Factor 1 and Factor 2 and Result columns.

When you look at an opcode in the ILE RPG Reference, there will be both the fixed form and the free-form equivalent presented.

I dare say, if only for the nifty date-handling operations we now have, that is a sufficient reason to move to RPG IV and eventually free-format.

The document, "Moving to ILE for RPG IV", is a redbook from 1995 - I think it's a great resource for getting started on this - here's a link to it -

www.redbooks.ibm.com/abstracts/gg244358.html?

Free-format first appeared at V5R1 of the OS - so I recommend going to any of the Infocenters and getting the ILE RPG Reference. If you want to look at history, the V5R1 Infocenter is at -

http://publib.boulder.ibm.com/iseries/v5r1/ic2924/info/rzahgicmain.htm

The latest version is at -

http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/index.jsp

ILE RPG (RPG IV) appeared first at V3R1 - if interested, here's a link to the V3R2 manuals - more historical interest, perhaps -

http://publib.boulder.ibm.com/pubs/html/as400/online/v3r2.htm

Anyhow, there's a long reply to your short observation!! I hope it's helpful.

Happy Thanksgiving!
Vern

On 11/28/2013 8:01 AM, newnancy@xxxxxxxx wrote:
I never understood the difference of regular RPG400 and free form RPG.
Supposedly they do not have the same opcodes.


Thank you,
Nancy
On Wed, 27 Nov 2013 19:12:38 -0600 "Jerry C. Adams" <midrange@xxxxxxxx>
writes:
Never understood what, Nancy?

[Nice name, by the way. Same as my little sister, and first girl
friend -
2nd grade. Different people, of course. .-) ]

Jerry C. Adams
IBM i Programmer/Analyst
People think I'm too patronizing. (That means talking down to
people.)
--
Home Office: 615-832-2730
email: midrange@xxxxxxxx

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of newnancy@xxxxxxxx
Sent: Tuesday, November 26, 2013 8:10 AM
To: rpg400-l@xxxxxxxxxxxx
Cc: rpg400-l@xxxxxxxxxxxx
Subject: Re: INLR no longer required?

This is really before my time, and I started programming in the
early 1990s.
Now are most of you using free form RPG or not? I never really
understood
the difference.


Thank you,
Nancy

____________________________________________________________
Do THIS before eating carbs &#40;every time&#41;
1 EASY tip to increase fat-burning, lower blood sugar & decrease fat
storage
http://thirdpartyoffers.juno.com/TGL3141/5295ff8224d17f8142a6st02vuc
--
This is the RPG programming on the IBM i (AS/400 and 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 IBM i (AS/400 and 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.


____________________________________________________________
How to Sleep Like a Rock
Obey this one natural trick to fall asleep and stay asleep all night.
http://thirdpartyoffers.juno.com/TGL3141/52974da940e404da952d4st01vuc


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.