Book Review: Programming in ILE RPG, Fifth Edition

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

 

This book really hits the mark and is a must-read for all RPG developers.

The 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.

Bruce Guetzkow

Bruce Guetzkow is an independent IBM i Programming Consultant with GmanTech Consulting in Southeastern Wisconsin who is a firm believer in Practical Programming. For over 30 years, he has developed applications for IBM systemsfrom mainframe to System/36 to IBM i on Power. You can follow him on Twitter (@gmantechi) or catch him at a meeting of the Wisconsin Midrange Computer Professional Association (WMCPA), where he served as webmaster from 2009-2013.

 

Links

Website: www.gmantechconsulting.com

WMCPA: www.wmcpa.org

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: