FASUG Application Development Day 2004

Track D Session 1

ILE RPG Structure: Subprocedures, Modules and Service Programs
Craig Pelkie


ILE RPG Structure: Subprocedures, Modules and Service Programs
Many RPG programmers are familiar with the concepts and basic rules of coding subprocedures, parameters and return values. But many programmers are puzzled about how to create modules and service programs based on multiple subprocedures.

In this session, Craig describes many "best practices" for constructing modules. You'll see how to design modules that have "worker" subprocedures and "accessor" subprocedures; how to work with optional and default values; techniques to manage and easily reuse source code; a template for designing modules; and rules of thumb for dealing with change after putting modules into production. Once you understand how to construct modules, you're well on your way to creating a library of code that you can easily extend and use as the basis for future development. As an added bonus, learning how to effectively work with modules is great preparation for learning other languages (such as Java) that use similar program construction techniques.

Craig Pelkie   is a frequent speaker at seminars and user group meetings around the country. Craig has written many articles for the major industry publications (Midrange Computing, News/400) and is an on-going contributor to iSeries 400 Experts Journal. Craig is a coauthor of four IBM Redbooks and the creator of the IBM Learning Services Net.Data course. Craig currently works with The 400 School to deliver customized training courses for Java and WebSphere projects. He maintains a web site at www.web400.com with many articles and code samples freely available to the iSeries 400 community.


Web Page: Ashway Consulting, LLC.