Main Page

encyclopedia.codeboy.net

 

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 common use today. 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 evolved into the E-Server 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 typically starts off with a File Specification, listing all files being written to, read from or updated, followed by an Input Specification containing program elements such as Data Structures and dimensional arrays. This is followed by the Calculation Specification which contains the actual meat of the code, and finally the Output Specifications which can be used to determine the layout of the report. RPG III eventually evolved into RPG IV which replaced the limiting punch-card type layout with free-format text-capable entry, and a greater variety of expressions within its new Extended Calculation Specification. RPG on the AS/400 thrived on the object-oriented look of the underlying operating system OS/400 to such 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).\n\n

"Logic is in the eye of the logician." - Gloria Steinem