This one short volume manages to essentially be both a general introduction and a detailed reference.
With Functions in Free-Format RPG IV, Jim Martin has done it again. Jim has a particular expertise in taking a highly technical topic and distilling it into just a couple of hundred pages, making it accessible to any IBM i programmer. Jim also has a knack for identifying just the right balance of general knowledge and technical detail, and this book demonstrates that sense of balance.
For example, the book spends the first two chapters gently introducing the topic of functions, first briefly describing the function as a general programming concept and then providing a list of the built-in functions (BIFs) that are provided in the RPG compiler itself. There are no real surprises here, just a rock-solid introduction to the topic, although Jim's technique of grouping RPG's BIFs by their return type is a unique way of categorizing them.
It's the third chapter that really has Jim's unmistakable signature. There aren't a lot of writers who can see the forest for the trees and include the C APIs as part of the larger world of functions. I know when I've given classes on RPG, I never thought about including the C APIs during a discussion of BIFs and certainly not as introductory material. But now that I've seen Jim's treatment of the subject, I see that the C APIs are a perfect introduction to the entire concept of functions and subprocedures in RPG. Rather than seeing subprocedures as just a new quirk of RPG, programmers instead can see that they derive from a long tradition of programming languages. And it's even better for those programmers who have used the C APIs in the past; by tying these concepts together, Jim makes it easy for those programmers to make the simple conceptual hop from C functions to RPG functions.
But you don't have to be a C programmer or even be familiar with the C APIs, because Jim immediately provides a couple of simple, straightforward examples of procedures written in RPG. Even then, he manages to include several segues into some pretty advanced topics, such as compiler directives and OS-version-specific programming. A hallmark of Jim's writing is that you have to be on your toes or you'll learn things you weren't expecting to learn!
The next part of the book provides a surprisingly in-depth coverage of ILE concepts, given its brevity, then continues on through the mechanics of prototyping and finally to a nice discussion of modular programming in RPG. I'd have loved even more coverage of the intricacies of prototypes and in particular the options on parameters, but Jim provides more than enough introductory material.
As I mentioned, the book displays that balance between general and specific information that Jim does so well. The two generous appendices provide a wealth of information. The first is a somewhat unconventional appendix covering a number of brief topics that I would call a "programmer's style handbook." The conventions are simple and built on common sense. For example, Jim is the first person I've seen give solid reasoning for not using the optional comment area on the far right of free-form calculations, such as the fact that they don't even appear on a 24x80 SEU screen! And the second appendix is a detailed list of the various built-in functions in RPG and their syntax, along with brief examples—exactly what you would expect in reference material. So this one short volume manages to effectively combine aspects of both a general introduction and a detailed reference. This combination is just what I've come to expect from a Jim Martin book, and Functions in Free-Format RPG IV does not disappoint.
LATEST COMMENTS
MC Press Online