IMHO: Is RPG Free-Form a Cat in Tiger's Clothes?

Commentary
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

As a long-time iSeries developer (that's AS/400 developer to you and me), I have seen RPG grow over many years. I first started writing RPG code on a System/34 using RPG II, so I have indeed seen some vast improvement. However, I feel somewhat let down by the latest iteration: free-form RPG. I want to be clear on one point before we start: I have made the switch to free-form. I have been using free-form for development almost exclusively for nearly two years. So I know of what I speak.

The first issue I have is that there is little to drive someone to make the switch. Can anyone give an example of something that can be done in free-form that cannot be done in RPG IV? I tried to think of something for an hour or so before I posed the question to some of my esteemed co-workers. They came up with zilch also.

Yes, you can make procedure calls without using a CALL. Yes, you can use the entire 80 columns to write an enormous equation that would take half a dozen lines in RPG IV. Yes, you can put a comment anywhere on the line now. So what? In the words of Jo Dee Messina, "Give me something I can use."

On the other hand, no, you cannot use the MOVE opcode anymore to change a string to a number. In fact, you can't use the MOVE opcode at all. I know: This is old news, and I should let it go, but the fact remains that the functionality was useful. No, you can't easily change a date data type to a decimal data type without reverting to "normal" RPG syntax.

The /free and /end-free are problematic, too. Has anyone ever forgotten the /end-free and tried to compile? Nothing will make your blood pressure spike like 500 or so compile errors, unless maybe it's trying to read some free-form code written by Einstein, the office genius who thinks he's found a way to turn free-form RPG into C++. News flash folks: No matter how you slice and dice it, RPG is not an object-oriented language.

To be honest, I actually prefer free-form to RPG IV, but I attribute this to the fact that I'm an old ANSI C developer. I simply prefer to see my code neatly indented and each of my lines ending with a semicolon (;). It's certainly not because there is any compelling developmental reason to use it. All IMHO...of course.

Jeff Olen is an independent consultant and has been developing on the iSeries and its predecessors for 17 years. Mostly, he can be found in airports and rental cars. When he's not living out of a suitcase, he can be found at his home in Orange, California, with his wife and daughter. You can reach him at This email address is being protected from spambots. You need JavaScript enabled to view it..




Jeff Olen

Jeff Olen is a super-spy now but keeps his cover identity intact by working for video game studios on the East Coast. So when he’s not out killing members of ISIS or rescuing refugees, you can find him playing Wolfenstein II or testing the new Fallout 76 releases at his beach house in Costa Rica. In any case, he can’t be reached. You can email his cat at This email address is being protected from spambots. You need JavaScript enabled to view it.. She will pass on your message…if she feels like it.


MC Press books written by Jeff Olen available now on the MC Press Bookstore.

The IBM i Programmer’s Guide to PHP The IBM i Programmer’s Guide to PHP
Get the scoop on how PHP can—and should—be deployed on IBM systems.
List Price $79.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: