Main Page | See live article | Alphabetical index

Report program generator

Report Program Generator, commonly known as RPG, is one of the few languages created for punch card machines that is still in use today (thankfully using a line editor and not the punch cards!). It was developed by IBM for their range of mainframe systems, especially the S/390 - as RPG II.

RPG II was ported to the System 36, while an improved version of the language, RPG III, was created for the System 38 and its successor the AS/400 (a mid-range machine, now called the iSeries) and became RPG/400 with a much cleaner syntax, and better file/database reading capabilities. This language was the mainstay of development on the AS/400, and its editor was a simple line editor with prompt templates for each specification (type of instruction).

An RPG program would start off with a File Specification, listing all files being read, created, written or queried, followed by an Input Specification listing all the variables in use along with any Data Structures and one dimensional arrays. The Calculation Specification would follow which contained the actual meat of the code, and finally any inprogram Output Specifications - like a summary report.

RPG III eventually evolved into RPG IV which reduced the limiting punch-card type layout and allowed a free-format text and expressions within its Extended Calculation Specification.

RPG on the AS/400 thrived on the object-orientated look of the underlying operating system (OS/400) to an extent that everything was a file (very similar to the Unix philosophy), so the terminal screen could be updated (with sub windows) by writing to a file (of type *DISPLAY).