The Leading Educational Resource for IT Professionals

Book Review: Programming in ILE RPG, Fifth Edition


Written by Bruce Guetzkow

Programming in ILE RPG Fifth Edition coverThe fifth edition of Programming in ILE RPG by Bryan Meyers and Jim Buck provides an excellent progression of subject matter for the next generation of RPG developers. There is a strong emphasis on free-format coding with plenty of references to fixed-format code. This perspective on RPG will make it easy for students to learn RPG and aid experienced developers in making a transition to more modern coding techniques

The book's preface outlines the challenges faced by the authors and their decision to focus on free-format while making the reader aware of code that will be encountered in the workplace. They also have restructured the sequence of topics in the book from previous editions and have added suggestions for programming style throughout the book.

The book begins with background information. This includes a brief history of the evolution of the RPG language. This is followed up with an introduction to files, records, fields, the development cycle, and elimination of program errors. This is followed by explaining the structure of an RPG program, including comments, blank lines (white space), and the use of pseudo-code to lay out the program logic. The authors then introduce the reader to creating files using SQL DDL and DDS.

RPG coding begins in earnest in Chapter 4 with declarations of all types. These are neatly tied back to all related fixed-format specifications, which are presented in the next seven chapters. The next four chapters outline program control, arithmetic, and character and date/time manipulation. Built-in functions (BIFs) are introduced as they relate to each topic.

File processing is handled next, using first native I/O and continuing with SQL access. Native instructions are explained along with different options for specifying key values. File and record locking, and open and close considerations are addressed to alert the reader to potential hazards. Host variables and structures are tackled in the SQL access chapter, as well as null values and return codes. There is a solid explanation of using SQL cursors to process multiple database records.

Arrays, tables, and multiple-occurrence data structures (MODS) in all of their flavors and their related operations and BIFs are handled in Chapter 11. Using arrays in SQL adds information even the most-seasoned developer will find useful.

The authors then introduce building interactive applications and using display files. They follow with explanations of how to call programs with parameters and go into detail on using a modular approach to development.

Procedures and service programs come next as these lead to even more modularity and reuse of code. An often-neglected area, even for seasoned professionals, follows: Handling errors, including with embedded SQL. The book comes to a conclusion after tackling subfiles and calling APIs.

Each chapter includes references to "legacy" code that all developers will encounter so modern techniques can be translated to older ones. There are chapter summaries, key terms, discussion points, and review questions to help the reader focus on important points. Exercises are geared to give the reader practical examples of each topic. There are also supplemental materials available online for further practice. Appendices include an ILE RPG Summary, Program Development Tools explanation, and information on Program Testing and Debugging.

The book is well-structured and a pleasant read. It leads the reader in a logical progression to becoming a modern developer. This book really hits the mark and is a must-read for all RPG developers.

Also in Bookstore News

Need Cross-Platform Data Access? This Book Can Help


Extract, Transform, and Load with SQL Server Integration Services, now available from MC Press, shows you how to build a handy, reusable cross-platform data access solution using familiar software tools—SSIS, Visual Studio, and others—to access data on SQL Server, IBM Db2, Oracle, or any platform that supports OLE DB or ODBC.

Continue Reading →

New from MC Press: Developing Business Applications for the Web


Developing Business Applications for the WebWhether you are a novice or experienced developer, you will find Developing Business Applications for the Web - With HTML, CSS, JSP, PHP, ASP.NET, and JavaScript to be essential reading to hone your Web development skills in building applications that perform business tasks.

Continue Reading →

New from MC Press: Identity Management: A Business Perspective


Identity Management: A Business PerspectiveTechnology advances like cloud, mobile, and Internet of Things have made identity and access management more important than ever, and also more complex. How can business leaders get a handle on their evolving identity needs? By making identity management a core part of business strategy, says Graham Williamson in his latest book, Identity Management: A Business Perspective.

Continue Reading →