RPG Tutorial: The RPG Logic Cycle

RPG is a non-procedural language.  The events that happen in any particular RPG programs occur in exactly the same order as in every other RPG program.  This order is known as the RPG Logic Cycle.  What makes one RPG program different from another is that "indicators" or switches are turned on or off, based upon tests performed on the data being processed, which cause or prevent input, calculation, or output events at specific points in the cycle.

I have seen several flow charts of the RPG Logic Cycle, but the most useful to me has been the one that is on the RPG Debugging template I acquired in 1973.  Using VISIO, I have recreated it below and you may download a printable copy of it in an Adobe PDF using this link:  http://www.jaymoseley.com/hercules/downloads/pdf/rpgflow.pdf.

Simple RPG programs may be written with only the understanding that the order of processing is Input followed by Calculations followed by Output.  But the more complex an RPG program is, the more important it will be for the programmer to thoroughly understand the RPG Logic Cycle.



Return to Site Home Page 


This page was last updated on January 17, 2015.