Topic: RPG Free

Date:Tuesday, April 27
Time:5:30 (Deli snack) - 6:00 (Meeting)
Location: Bloomfield Township Public Library
1099 Lone Pine Road
Bloomfield Hills, MI 48302-2410
S.E. corner of Lone Pine and Telegraph Road (map)
Speaker:Jim Martin
Notes:Free Format RPG(Powerpoint)
or Powerpoint 7

Coding free format RPG IV is an option - a style option. In creating this new style option, IBM has done something of significance: Many old op-codes are no longer supported! For the first time in RPG's lengthy history, a major break has been made with the past. In free format there are 55 operations supported, compared to 112 in fixed format. Most "lost" operations are insignificant, such as ADD, SUB, DIV, Z-ADD, and similar. They are replaced by Eval expression operators. Many operations are replaced by built-in functions: SCAN is replaced with %scan, LOOKUP is replaced with either %tlookup or %lookup, and SUBST becomes %subst. A few popular operations are sorely missed, such as MOVE and MOVEA. However, even these have a counterpart (in some way) in free format. Also among the missing, and a big departure from the past, is our old friend GOTO. This means we are coerced into coding programs in a structured way.

So, what have we got here: A new and modern (like other contemporary languages) style of programming using most of our familiar RPG op-codes. Most maintenance programmers have said that if properly done, free format code is easier to read and understand. This is important from an efficiency viewpoint. "Easier" translates into time saved, or less time to fix or modify a program. Less time means less money spent. My conclusion is that this new style of RPG, while still in its infancy, provides a significant opportunity for us in the RPG programming community to improve the quality and maintainability of our work.

About the Speaker

Jim Martin

Jim Martin has a BS degree in mathematics and an MS in computer science. He was employed by IBM for 26 years, where he wrote RPG applications for customers and also worked in the programming laboratory as a programmer of portions of CPF and OS/400. After leaving IBM, he took post-graduate work in computer science and performed RPG training. He is an IBM-certified RPG IV developer.

Jim is a speaker at Common and has written several books including Free-Format RPG IV: How to Bring Your RPG Programs Into the 21st Century and Functions in Free Format RPG IV. Jim's books can be found at or MC Press.