FACTOID # 151: The five countries with the highest coffee consumption are also the five countries whose citizens trust one another the most. Coincidence? Probably.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > RPG programming language

RPG is a native programming language for IBM's iSeries servers - the latest generation of midrange servers which included System/38, System/36, AS/400, iSeries and System i5 systems. Its latest incarnation is RPG IV which includes prototyped functions and procedures, static and dynamic binding, access to C routine libraries, dynamic link libraries, and fully recursive and re-entrant code. Computer code (HTML with JavaScript) in a tool that uses syntax highlighting (colors) to help the developer see the purpose of each piece of code. ... International Business Machines Corporation (IBM, or colloquially, Big Blue; NYSE: IBM) is a computer technology firm headquartered in Armonk, NY, USA. The company, which was founded in 1888 and incorporated June 15, 1911, manufactures and sells computer hardware, software, infrastructure services, hosting services, and consulting services. ... Enterprise class server and the successor to the AS/400. ... The IBM System/38 was a computer. ... The System/36 was a minicomputer marketed by IBM from 1983 to 2000. ... The Application System/400 (also known as AS/400, iSeries (since 2000) and System i5 (since 2006)) is a type of minicomputer produced by IBM. It was first produced in 1988 and, as of 2006, is still in production. ... Enterprise class server and the successor to the AS/400. ... The Application System/400 (also known as AS/400, iSeries (since 2000) and System i5 (since 2006)) is a type of minicomputer produced by IBM. It was first produced in 1988 and, as of 2006, is still in production. ... The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language is a standardized imperative computer programming language developed in the early 1970s by Dennis Ritchie for use on the Unix operating system. ... In computer science, a library is a collection of subprograms used to develop software. ... See: Recursion Recursively enumerable language Recursively enumerable set Recursive filter Recursive function Recursive set Primitive recursive function This is a disambiguation page — a list of pages that otherwise might share the same title. ... A computer program or routine is described as reentrant if it is designed in such a way that a single copy of the programs instructions in memory can be shared by multiple users or separate processes. ...

Contents


Overview

RPG (aka RPG IV aka RPGLE) is the mainstay programming language of the IBM iSeries platform. Originally designed as a query tool, IBM has enhanced the language to become a full-fledged, powerful programming language. International Business Machines Corporation (IBM, or colloquially, Big Blue; NYSE: IBM) is a computer technology firm headquartered in Armonk, NY, USA. The company, which was founded in 1888 and incorporated June 15, 1911, manufactures and sells computer hardware, software, infrastructure services, hosting services, and consulting services. ... Enterprise class server and the successor to the AS/400. ...


An RPG program typically starts off with a File Specification, listing all files being written to, read from or updated, followed by a Data Definition Specification containing program elements such as Data Structures and dimensional arrays (much like a "Working-Storage" section of a COBOL program or var statements in a C program). This is followed by the Calculation Specification, which contains the actual meat of the code. Output Specifications can follow which can be used to determine the layout of a report or the report can be defined externally.


In the early days of RPG, its major strength was known as the program 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. Today, most RPG programmers avoid using the cycle in favor of controlling the flow of the program with standard looping constructs.


History

RPG is one of the few languages created for punch card machines that is still in common use today. This is because the language has evolved considerably over time. 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 punch card (or Hollerith card) is a recording medium for holding information for use by automated data processing machines. ... International Business Machines Corporation (IBM, or colloquially, Big Blue) (NYSE: IBM) (incorporated June 15, 1911, in operation since 1888) is headquartered in Armonk, New York, USA. The company manufactures and sells computer hardware, software, and services. ... The 1960s decade refers to the years from 1960 to 1969, inclusive. ... The IBM 1401 was a variable wordlength decimal computer that was announced by IBM on October 5, 1959 and marketed as an inexpensive Business Computer. It was withdrawn on February 8, 1971. ...


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. COBOL is a third-generation programming language. ... BASIC (Beginners All-purpose Symbolic Instruction Code) is a family of high-level programming languages. ...


RPG was further developed by IBM for their range of mainframe systems, especially the S/360 - as RPG II. Mainframes (often colloquially referred to as big iron) are large and expensive computers used mainly by government institutions and large companies for legacy applications, typically bulk data processing (such as censuses, industry/consumer statistics, ERP, and bank transaction processing). ... The IBM System/360 (S/360) is a computer system family announced by International Business Machines on April 7, 1964. ...


Because the language syntax was based on the plug-boards used to program unit record equipment, and the System/3 was initially developed as a successor to plug-board 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/400 (a mid-range machine, now evolved into the eServer iSeries) and became RPG/400 with a much cleaner syntax, and tighter integration with the integrated database. This language became 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). Plug-boards, or, more formally, control panels were devices used to program IBM unit record equipment from roughly the 1930s to the 1960s. ... Before the advent of electronic computers, data processing was performed using electromechanical devices called unit record equipment, electric accounting machines (EAM) or A data processing shop would have at least one of most of the machine types. ... A System 3 punch card. ... A System 3 punch card. ... The System/32 (IBM 5320) is a single user minicomputer marketed by IBM in the mid- to late 1970s. ... The System/34 was a minicomputer marketed by IBM from 1978 to 1983. ... The System/36 was a minicomputer marketed by IBM from 1983 to 2000. ... The IBM System/38 was a computer. ... The Application System/400 (also known as AS/400, iSeries (since 2000) and System i5 (since 2006)) is a type of minicomputer produced by IBM. It was first produced in 1988 and, as of 2006, is still in production. ... Minicomputer (colloquially, mini) is a largely obsolete term for a class of multi-user computers which make up the middle range of the computing spectrum, in between the largest multi-user systems (traditionally, mainframe computers) and the smallest single-user systems (microcomputers or personal computers). ... International Business Machines Corporation (IBM, or colloquially, Big Blue) (NYSE: IBM) (incorporated June 15, 1911, in operation since 1888) is headquartered in Armonk, New York, USA. The company manufactures and sells computer hardware, software, and services. ... Enterprise class server and the successor to the AS/400. ...


RPG III significantly departed from the original language, providing modern structured constructs like IF-ENDIF blocks, DO loops, and subroutines. In computer science, a subroutine (function, procedure, or subprogram) is a sequence of code which performs a specific task, as part of a larger program, and is grouped as one or more statement blocks; such code is sometimes collected into software libraries. ...


In 1994, RPG IV (aka RPGLE aka RPG/ILE) was released and the name, officially, was no longer an acronym. RPG IV offered a greater variety of expressions within its new Extended Factor-2 Calculation Specification.


In 2001, with the release of OS/400 V5R1, RPG IV offered even greater freedom for calculations than offered by the Extended Factor-2 Calculation Specification: a free-format text-capable source entry, as an alternative to the original column-dependent source format. The "/FREE" calculation does not require the operation code to be placed in a particular column; the operation code is optional for the EVAL and CALLP operations; and syntax generally more closely resembles that of mainstream, general-purpose programming languages. OS/400 is an operating system used on IBMs line of AS/400 (now called iSeries) minicomputers. ...


Today, RPG IV is a considerably more robust language. Editing can still be done via the simple editor or it can edited via PC using IBM's Websphere Development Studio. IBM is continually extending its capabilities and adding more built-in functions (BIFs). It has the ability to link to Java objects (See IBM's RPG Reference Manual ), and OS/400 APIs; it can be used to write CGI programs with the help of IBM's Cgidev2 web toolkit, RPG xTools [1] CGILIB and other commercial Web enabled packages. And yet, it retains a great deal of backward compatibility. So an RPG program written 35 years ago could run today with little or no modification. Java is an object-oriented programming language developed by James Gosling and colleagues at Sun Microsystems in the early 1990s. ... OS/400 is an operating system used on IBMs line of AS/400 (now called iSeries) minicomputers. ... API may refer to: In computing, application programming interface In petroleum industry, American Petroleum Institute In education, Academic Performance Index This page concerning a three-letter acronym or abbreviation is a disambiguation page — a navigational aid which lists other pages that might otherwise share the same title. ... Common Gateway Interface (CGI) is an important World Wide Web technology that enables a client web browser to request data from a program executed on the Web server. ... CGIDEV2 is a popular and free open source iSeries(AS/400) based program development toolkit that facilitates the development of interactive web-based programs using RPG ILE or Cobol (using the older CGIDEV version) as the back-end Common Gateway Interface language. ...


Example code

The following program receives a customer number as an input parameter and returns the name and address as output parameters.

 * Historically RPG is columnar in nature, though free-formatting * is allowed under particular circumstances. * The purpose of various lines code are determined by a * letter code in column 6. * An asterisk (*) in column 7 denotes a comment line * "F" (file) specs define files and other i/o devices FARMstF1 UF E Disk Rename(ARMST:RARMST) * "D" specs are used to define variables D pCusNo S 6p 0 D pName S 30a D pAddr1 S 30a D pAddr2 S 30a D pCity S 25a D pState S 2a D pZip S 10a * "C" (calculation) specs are used for executable statements * Parameters are defined using plist and parm opcodes C *entry plist C parm pCusNo C parm pName C parm pAddr1 C parm pAddr2 C parm pCity C parm pState C parm pZip * The "chain" command is used for random access of a keyed file C pCusNo chain ARMstF1 * If a record is found, move fields from the file into parameters C if %found C eval pName = ARNm01 C eval pAddr1 = ARAd01 C eval pAddr2 = ARAd02 C eval pCity = ARCy01 C eval pState = ARSt01 C eval pZip = ARZp15 C endif * RPG makes use of switches. One switch "LR" stands for * "last record". This ends program execution. C eval *InLR = *On 

The same program using free calculations:

 * "F" (file) specs define files and other i/o devices FARMstF1 UF E Disk Rename(ARMST:RARMST) * "D" specs are used to define variables and parameters * The "prototype" for the program is in a separate file * allowing other programs to call it /copy cust_pr * The "procedure interface" describes the *ENTRY parameters D getCustInf PI D pCusNo 6p 0 const D pName 30a D pAddr1 30a D pAddr2 30a D pCity 25a D pState 2a D pZip 10a /free // The "chain" command is used for random access of a keyed file chain pCusNo ARMstF1; // If a record is found, move fields from the file into parameters if %found; pName = ARNm01; pAddr1 = ARAd01; pAddr2 = ARAd02; pCity = ARCy01; pState = ARSt01; pZip = ARZp15; endif; // RPG makes use of switches. One switch "LR" stands for // "last record". This ends program execution. *InLR = *On; /end-free 

Platforms

As stated above, the RPG programming language originally was introduced by IBM for their proprietary 1401, /32, /34, /36, /38, AS/400, and iSeries systems. But there have also been implementations for the Digital VAX, Sperry Univac BC/7, Univac system 80, Siemens BS2000, Burroughs B1700, Hewlett Packard HP3000, ICL 2900 series, and WANG VS, as well as miscellaneous compilers for Unix-based systems (Unibol) and PCs (Baby/400, Lattice-RPG). BS2000 is an operating system from Siemens Nixdorf Informationssysteme for mainframes. ... The Burroughs B1000 Series machines consisted of three major generations. ... The Hewlett-Packard 3000 series is a family of minicomputers released by the company in 1973 after a difficult development project. ...


RPG II applications are still supported under the HP OpenVMS operating system on VAX, Alpha, and Integrity processors by the third party Migration RPG compiler.


  Results from FactBites:
 
RPG programming language - Wikipedia, the free encyclopedia (840 words)
RPG is a native programming language for IBM's iSeries servers - the latest generation of midrange servers which included System/38, System/36, AS/400, iSeries and System i5 systems.
RPG (aka RPG IV aka RPGLE) is the mainstay programming language of the IBM iSeries platform.
RPG is one of the few languages created for punch card machines that is still in common use today.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.