Index: > A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Business Industries Finance Tax

Home > RPG programming language


First Prev [ 1 2 ] Next Last

RPG or RPG IV is a native programming language for IBM's iSeries (aka AS400) minicomputer system. In its latest incarnation includes prototyped functions and procedures, static and dynamic binding, access to C routine libraries, dynamic link libraries, and fully recursive and re-entrant code.

1 Overview

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.

The major strength of RPG is known as "The Cycle": every RPG program executes within an implied loop, which can apply the program to every record of a file. Alternately, "The Cycle" can make an interactive program continue to run until explicitly stopped.

The other distinguishing characteristic of RPG is that it, to a far greater extent than COBOL or FORTRAN, is column-dependent.

2 History

RPG, is one of the few languages created for punch card machines that is still in common use today. It was originally developed by IBM in the 1960s and ran on the popular IBM 1401. Originally, RPG was an acronym for Report program generator, descriptive of the purpose of the language: generation of reports from data files, including matching record and sub-total reports.

The alternative languages generally available at the time were either COBOL or BASIC, one verbose, the other a poor tool for development, so RPG became pre-eminent on IBM hardware.

RPG was further developed by IBM for their range of mainframe systems, especially the S/390 - as RPG II.

Because the language syntax was based on the plugboards used to program unit record equipmentBefore the advent of electronic computers, data processing was performed using electromechanical devices called unit record equipment ''electric accounting machines (EAM or tabulating machines. A data processing shop would have at least one of most of the, and the System 3 was initially developed as a successor to plugboard-programmable unit record machines, RPG II was ported to the System 3, System 32, System 34, and System 36, while an improved version of the language, RPG III, was created for the System 38 and its successor the AS/400The AS/400 is an IBM minicomputer for small business and departmental users, released in 1988 and still in production under the name iSeries . The AS/400 is an object oriented system with an integrated database that was designed to implement E. Codd's rel (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).

RPG III significantly departed from the original language, providing modern structured constructs like IF-ENDIF blocks, DO loops, and subroutines.

In 1998 RPG IV (aka RPG/LE aka RPG/ILE) was released and the name, officially, was no longer an acronym. RPG IV offered a free-format text-capable source entry, as an alternative to the orignal column-dependent source format, and a greater variety of expressions within its new Extended Calculation Specification.

RPG has thrived on the object-oriented API of the OS/400 operating system to such an extent that everything is a file (somewhat similar to the Unix philosophy): the terminal screen can be updated (with sub windows) by simply writing to a file (of type *DISPLAY).





Non User