It is nice to know that we can still be surprised.
When we first heard that IBM intended to release a completely** free-form version of RPG, we braced ourselves for the seemingly inevitable flood of negativism that past history indicated would follow the announcement. And to be sure there were a few comments along the lines of "Why are they bothering - that's already available in XXX (insert language of choice here) so why add it to RPG?" and "If IBM thinks that will make the language attractive to new programmers they are nuts." But overall the noise level was far less than we had anticipated, which was a pleasant surprise.
Since then, we have continued to be surprised by how well this new support has been received. In fact the vast majority of programmers we have talked to at conferences and in our private classes have embraced the changes, as have most who commented on the changes in the various online forums we monitor. At the most recent RPG & DB2 Summit, we had to move Barbara Morris's session on the new free-form support to a much bigger room to handle the number of attendees who wanted to attend.
Even those who claim that they probably won't be using the new support themselves have agreed that it will make life much easier for the new programmers in their shop who "really struggle with the fixed-form F and D specs." And that, after all, is the real point of these changes. We need new blood and we need it fast.
In a few weeks we will be delivering an "Introduction to RPG and IBM i" class to a group of Java programmers. This will be the first time where we be teaching nothing but the free-form version of the language in the initial training. Once they have the basics under their belts their co-workers will (hopefully gently) be initiating them in the dark and arcane art of traditional F specs. They will need to learn D specs as well, of course, but they're at least somewhat simpler. Luckily for these RPG newbies, the shop already owns a copy of Linoma's RPG Toolbox so converting existing code to the new format will be easy for them. We're looking forward to it and are sure that the learning curve will be shorter for them than it was for the COBOL, C++ and Java programmers that we have taught in the past year.
Talking of surprises, we've uncovered quite a few pleasant ones (and a couple of "gotchas") in the new support over the past few months. So in this month's IBM i Extra we've put together a list of those we have discovered to date. If you have found any that we have missed please let us know via the comments here or with the article.
(** Yes, we know that I and O specs are still fixed format but if you're still using those, you really shouldn't be.)
I am one who embraced the completely /free-form syntax.
For many years, I have been using the CODE editor - in XP Mode - for my RPG development. XP mode was required because Windows 7 64-bit didn't play well with the IBM Communications interface.
When IBM introduced the completely /free-form syntax, it would not be supported in CODE (let alone XP mode supported by Microsoft).
Fortunately, IBM was very wise in making sure that RDi 9 supported the completely /FREE-FORM syntax!
I just had to try it, and see for myself if the truly /free-form syntax worked properly in RDi, and if it would make my life easier.
Well - it DID work! And, I converted a few of my service programs to completely /FREE form - and absolutely could not go back to CODE from that point forward.
I'm proud to say that our company now owns an RDi license, and if we ever hire another programmer, we will purchase another.
However, saying that RPG is now complete /FREE form is a bit invalid - I specs are still required.
No worries... I created a source member for just I-specs, surrounded by /IF DEFINED directives, and copied that source member in. Works beautifully!
The majority of our code from our ISV has been around for quite some time, and is all RPG/400. For support reasons, we try to minimize the amount of changes to their code. However, I converted one of their order-entry programs that we had heavily modified from RPG/400 to RPG-IV, then spent a few days rewriting logic in completely /FREE form. It is presently being tested.
Negativity? You won't hear any rumbling from me. :-)
Posted by: Dan Devoe | June 11, 2014 at 04:16 PM
^I-specs are still required? Where? I can't think of anything offhand, that can't be done in the D-spec instead...
Posted by: Charles | June 12, 2014 at 02:40 PM
I-specs are still required? Where?
We use a few multi-format join logicals that have been provided by our ISV.
The I-specs are to determine (which record format got read, and to optionally rename some fields so they match between formats.
There aren't many of these, but they do exist in my shop.
So rather than clutter up the nicely-format /FREE code, all my I-Specs will be stored in one I-SPEC member, and the program I'm working on will contain
/DEFINE
followed by
/COPY I-SPECS
The I-SPECS member will have all the I-Specs used by any converted program, all surrounded by /IF DEFINE logic.
Posted by: Dan Devoe | June 13, 2014 at 09:14 AM
Thank you Jon and Susan for continuing to support the IBM i platform and RPG. You have become synonymous with modern RPG techniques and its applications.
Your commitment to educating the IBM RPG community is tireless and always inspiring. RPG is truly a business language and continues to support the largest industries in the world every day without issues.
I look forward to seeing you two again if you are in Florida in the near future. Keep up the good work!
Posted by: George Fusté | June 19, 2014 at 06:44 AM
You mention a list of suprises in this blog. I've look everywhere to try to find it, but it isn't obvious to me. Where is it?
Posted by: Account Deleted | June 23, 2014 at 08:28 AM
Hi Barry,
You'll find the list in the EXTRA article here: http://www.ibmsystemsmag.com/ibmi/developer/rpg/freerpg_surprises/
Thanks for reading!
Posted by: IBM Blogs | June 23, 2014 at 08:33 AM
For a laugh, I wrote a Java to RPGLE converter. Java source in, RPGLE source out. It was an interesting exercise, and worked reasonably well. No idea of the practical uses of it though!
Posted by: Ray Gillies-Jones | July 02, 2014 at 08:01 AM