RPG II is a very early and popular version of the IBM RPG programming language.
56-838: It was developed in the late 1960s and designed to work on the smallest IBM systems of the time such as the IBM 1130 , IBM System/3 , System/32 , System/34 , System/36 . It was also available for the System/370 , The Singer System 10 , Sperry Univac 90/25, 90/30, 90/40, System 80, 1100 mainframe series and the Wang VS Series. ICL produced versions for its ICL 2903 system and for VME/K ; and Burroughs Corporation produced an RPG II compiler with database extensions for its B1700 series of computers. Digital Equipment Corporation had their own implementation named VAX RPG II for VAX/VMS systems. An enhanced version RPG III appeared in 1978. It has
112-593: A System/360 mainframe. The total production run of the 1130 has been estimated at 10,000. The 1130 holds a place in computing history because it (and its non-IBM clones) gave many people their first direct interaction with a computer. Its price-performance ratio was good and it notably included inexpensive, removable disk storage , with reliable, easy-to-use software that could be in several high-level languages . The low price (from around $ 32,000 or $ 41,000 with disk drive) and well-balanced feature set enabled interactive "open shop" program development . The IBM 1130 uses
168-520: A je (Jump if Equal) instruction in the X86 assembly language will result in a jump if the Z (zero) flag was set by some previous operation. A command line switch is also referred to as a flag. Command line programs often start with an option parser that translates command line switches into flags in the sense of this article. This operating-system -related article is a stub . You can help Misplaced Pages by expanding it . This computer science article
224-490: A "pseudo-operation code" in columns 4–7. "␢" represents a single blank. The JOB record can have a "T" in column 8 to indicate that any files added to the User Area by this job should be deleted at the end. Columns 11 thru 15 can contain a cartridge label; the system verifies that the specified cartridge is mounted before proceeding. The XEQ record may contain the name of the program to be run in columns 8 thru 12. If this
280-426: A 1 megabyte disk drive that stored the operating system, compilers and object programs, with program source generated and maintained on punched cards . Fortran was the most common programming language used, but several others, including APL , were available. The 1130 was also used as an intelligent front-end for attaching an IBM 2250 Graphics Display Unit, or as remote job entry (RJE) workstation, connected to
336-467: A DUP. With limited disk space, program source files are normally kept as decks of cards. Users having larger requirements may have a disk of their own containing the operating system, but only their files, and would have to replace the "pool" system disk with theirs and restart the system when their programs are to be run. A system with a second disk drive that can be devoted entirely to one user's code and data provides some relief. A disk pack or cartridge
392-417: A card reader or a paper tape reader. The bootstrap procedure reads one card from the card reader. The boot card contains binary code to read the contents of sector zero of the disk drive, which in turn handles the "operation complete" interrupt from the disk drive and performs additional disk reads to prepare the 1130 for the first punched-card job. The whole process takes about a second to complete. When
448-586: A disk image file format with all the remaining system area deleted, to prevent copying other modules that would normally reside on the same disk, such as the assembler or compilers. Oklahoma State University developed an ALGOL 68 compiler, written in ANSI Fortran 1966. A FOCAL interpreter was developed at the University of Michigan. IBM also distributed a large library of programs, both IBM-supported (Type I and II) and unsupported (Type III and IV). Since
504-508: A lower-priced product with a 5.9 μs cycle time. Some purchasers of performance upgrades observed that the field adjustment to achieve the improvement was surprisingly trivial. The IBM 1132 printer relies on the 1130 processor rather than internal logic to determine when to fire the print wheels as they rotated. Printers for the Model 4 run more slowly, but the slower processor still can not keep up with it. The hardware manual discloses that when
560-493: A machine. In this multi-pass compiler , each "phase" processes the entire source program and takes it another step toward machine code. For example, the first phase reads the source statements into memory, discards comment lines, removes spaces except in text literals, concatenates continuation lines and identifies labels. The compiler is available in a disk-resident version as well as on eight-channel punched paper tape or punched cards. The most widely used operating system for
616-448: A number of unusual features, including: an implied processing loop; and that it is a fixed-format programming language, so that programs are difficult to read without a special debugging template. RPG II is a fixed-format programming language, which means that code must be placed in exact column locations in order to generate correct results. There are eight different specification types, and separate coding forms are used to write each, and
SECTION 10
#1732863062381672-411: A program can go through this process each time it is to be run, and for infrequently used programs this is preferred in order to conserve disk space. The following control card instructs DUP to take the current contents of working storage and move it to the user area naming it PROGM. DUP knows the size of the file in working storage. The size of the user area will be increased by the size of the file, and
728-403: A set of logical variables numbered 01–99 for user-defined purposes, or other smaller sets based upon record, field, or report processing functions. Special variables such as UDATE, UYEAR, PAGE, and so forth, are filled when the program begins or when page overflow occurs, even though there is no explicit instruction for these activities. Total calculations and output are done at "total time," after
784-490: A special debugging template used as an aid to read program printouts. Every RPG II program executes within an implied loop, the program cycle , which applies the program successively to every record of a file - this is documented via a "Logic Flow" diagram on the debugging template. Each record (individual punched card) would be compared to each line in the program, which would act upon the record, or not, based upon whether that line had an "indicator" turned "on" or "off" — from
840-489: A specific order: U , T , H , F , E , L , I , C AND O . Specification codes appear in column 6 of an RPG-II specification: Operation codes appear in columns 28–32 of an RPG-II calculation specification. CHAIN retrieves the record in the indexed file named in Factor 2 that matches the exact key specified by the value in Factor 1. SETLL causes the index pointer for the file named in Factor 2 to be positioned at
896-557: A task's first available memory starts with address /01FE ( hexadecimal ) or word 510. When the job ends or is aborted, the supervisor loads the Monitor Control Record Analyzer ( MCRA ) to read the job control for the next. While the job is running, the Supervisor is inactive. Aside from device drivers and interrupt processing all CPU time is entirely devoted to the job's activities. Other programs distributed as part of
952-488: Is defined by DUP, and stores data, and programs in core image format only. It is not repacked when files are deleted. The user area stores data and programs in any format. The boundary between the user area and working storage "floats"— the user area expands as files are added and contracts as it is repacked to reclaim space from deleted files. If a file needs to be modified, the usual process is to use // DUP commands to delete it, which moves any subsequent files back to close
1008-536: Is initialized for use on the 1130 by the Disk Pack Initialization Routine (DIPR). This routine scans the disk, and writes sector addresses on all cylinders, flags defective sectors, and writes a cartridge id on cylinder zero. DIPR is a Standalone program , which is loaded from cards or paper tape, and accepts the cartridge id from the system console. The Disk Utility Program (DUP) provides commands for transferring programs, subroutines and data. It
1064-533: Is invoked by the job control // DUP card, followed by one or more control cards: Other commands, mainly for use by the system administrator, define or expand the Fixed Area, delete the FORTRAN compiler and/or Assembler from the system, and restore correct sector addresses to Working Storage if they have been modified. The operands have to be placed into fixed columns.The source device code goes in columns 13 and 14,
1120-593: Is omitted, the program currently in Working Storage will be executed. If column 14 contains "L", and the program is in Disk System Format (not core-image) a core map will be printed by the Core Load Builder. If this statement is followed by LOCAL NOCAL , or FILES Supervisor Control Records, columns 16 and 17 contain the count of these records. Column 19 optionally indicated which disk driver routine
1176-535: Is the cold-start program , followed by a communications area and the resident monitor in sectors one and two. Sectors three through five contain the System Location Equivalence Table (SLET)—a directory of all phases of all monitor programs. Other control information fills out the first track. The system area is present on system cartridges. It contains the Disk Monitor program, and optionally
SECTION 20
#17328630623811232-558: Is the goal. Eastern Michigan University developed a Fortran IV compiler for the 1130, known as Fortran-EMU, as an alternative to the Fortran IV (subset) compiler provided by IBM. It adds many Fortran Iv features not supported by the IBM compiler, including the LOGICAL data type, six-letter variable names, and enhanced diagnostics. The Fortran-EMU compiler was distributed as a deck of punched cards in
1288-437: Is to be linked. "0", "1", or "N", request DISK1, DISK2, or DISKN, any other character, including blank, requests DISKZ, the FORTRAN disk routine. Supervisor control records begin with an "*" in column 1, immediately followed by the command pseudo-operation in column 2. They are LOCAL , NOCAL , and FILES for the Core Load Builder. DUP control records have a similar format. These records control program linking, either for
1344-571: Is to mark or designate data structures for future processing. Within microprocessors and other logic devices, flags are commonly used to control or indicate the intermediate or final state or outcome of different operations. Microprocessors typically have, for example, a status register that is composed of such flags, and the flags are used to indicate various post-operation conditions, such as when there has been an arithmetic overflow . The flags can be utilized in subsequent operations, such as in processing conditional jump instructions . For example
1400-480: The // XEQ statement or the DUP *STORECI command. The enduring memories of the IBM 1130 may have resulted from its need for continual human intervention. It was usually occupied running "jobs" specified by a deck of punched cards . The human operator would load jobs into the card reader and separate them back into jobs for return, perhaps along with printed output, to the submitter. The operator would also have to watch
1456-519: The IBM 1620 . The IBM 1500 is a multi-user educational system based around either an IBM 1130 or an IBM 1800. It can connect to up to 32 student work stations, each with a variety of audio-visual capabilities. Other than these, IBM produced no compatible successor systems to the 1130. The IBM System/7 is a process control and real-time system, and the IBM Series/1 is a general-purpose 16-bit minicomputer, both having different architectures from
1512-447: The 1130 for evidence of a malfunctioning or stalled job and intervene by pressing the INT REQ key on the keyboard to skip ahead to the start of the next job. Marking the start of a job was a punched card that started with // JOB . Any card that started with // was a command to the Supervisor and could not be used as user program or data. Other commands included // DUP to execute
1568-504: The 1130 is the Disk Monitor System Version 2 (DM2) introduced in 1967. DM2 is a single-task batch-oriented system. It requires a system with at least 4 KB of core memory and one integrated 2310 disk drive for system residence. The Supervisor is tiny by modern standards, containing assorted system details such as first-level interrupt routines, called Interrupt Level Subroutines , plus the disk driver and routines to load
1624-516: The 1130 was aimed primarily at the scientific market, scientific and engineering programs predominated: The 1130 also occupied a niche as a data processing machine for smaller organizations: There is also special-purpose software: Batch operation of the 1130 is directed by control records in the primary input stream (card or paper tape reader). There are two types of control records, monitor control records and supervisor control records. Monitor control records are identified by //␢ followed by
1680-486: The 1130, and from each other. To maximize speed and conserve space, the operating system and compilers are written entirely in assembly language and employ techniques that are rare today, including intermixing code and data as well as self-modifying code . Much user programming is done in Fortran . The 1130 Fortran compiler can run on a machine with only 4,096 words of core—though the compiled program might not fit on such
1736-402: The 1130. Nor was there protection against writing to disk. If the copy of the system software on disk is modified, it can be restored by reloading it from about 4000 binary-coded punched cards (approximately two boxes). The IBM 2310 disk drive stores sectors of 320 words (640 bytes) plus a one-word sector address. A cylinder consists of two tracks stacked on the top and bottom surfaces of
IBM RPG II - Misplaced Pages Continue
1792-401: The 1131 Central Processing Unit, the primary processing component of the IBM 1130. The Model 1 through Model 5 describe the core memory cycle time, as well as the model's ability to have disk storage. A letter A through D appended to the model number indicates the amount of core memory installed. IBM 1131 Central Processing Unit weighs about 760/1050 lb (345/477 kg). The Model 4 was
1848-511: The 1970s version included the IFEQ/IFNE/IFGT/IFGE/IFLT/IFLE and END grouping. Also, the call/parm to be able to call external subroutines. Another change was that for internal subroutines, you no longer had to put SR in columns 7 and 8 of the C (calculation) specs. Third-party providers sold more than 200 different assembler subroutines that could be used by System/36 and Advanced/36 programmers to exceed RPG II limitations. Some of
1904-481: The 2315, or stacked on the top and bottom surfaces of each of the 6 platters (outermost surfaces excepted) of the 1316 disk pack used in the 2311. Each disk cylinder contains eight sectors per surface with each surface having a dedicated read-write head. Each sector is logically divided by the monitor into sixteen disk blocks of 20 words (40 bytes) each. The disk block is the unit of allocation for files. The system distinguishes between system cartridges , which contain
1960-495: The DIV operation for "56 divided by 3" would place the value 2 in the result field. Indicators are either 'set' or not, they are "flags" or boolean data types . Foldable sheets, templates, plastic coated against wear and staining, were available, summarizing the different specifications. Used for the visual inspection and verification of the fixed-format source code text when held against its printed output. They matched and aligned with
2016-566: The Disk Utility Program (to delete files or add the file in the temporary area to the file collection) and // XEQ to execute a named program from disk. If a user program tried to read a command card, the standard card reader routine would signal end-of-input to the program and save that card's content for the Supervisor. Unlike the IBM 360, where a booting device can be selected from the system console, an IBM 1130 can only be "booted" (IPL'd: Initial Program Load) from an external device:
2072-517: The FORTRAN compiler, the Assembler, and a core image buffer used for linking relocatable programs. It also contains the user file directories— Fixed Location Equivalence Table (FLET), and Location Equivalence Table (LET), Following the system area, the cartridge contains up to three logical subdivisions: the fixed area , the user area , and working storage . Both the fixed area and user area store non-temporary programs and data. The fixed area size
2128-410: The IBM 1130 is started, the Supervisor is still in memory and probably intact, as core memory retains its state without power. If the operator concludes that a user program has stalled, the Supervisor can sense a key press to abort the program and skip ahead to the next // card. The Supervisor is not protected against modification by a badly written job, a case that might require that the operator reboot
2184-414: The Model 4 was servicing the two highest-level interrupts (the level 0 card-reader column interrupt or the level 1 printer interrupt), it ran at the faster 3.6 μs cycle time. Some users of the Model 4 would write a phony printer driver that did not dismiss the printer interrupt, in order to benefit from the higher processor speed. However, lower-level interrupts are disabled during this interval, even
2240-469: The destination device in columns 17 and 18. These device codes are: Optionally, a program name may be coded in columns 21 thru 25, and a count field in 27 thru 30. The interpretation of these fields depends on the DUP function requested. Programs can be converted to a faster-loading format with the STORECI command, which invokes Core Image Builder (DM2's counterpart to the 360's Linkage Editor). Alternatively,
2296-403: The detail cycle when L1/LR has been set on by fixed logic. The concept of RPG's program cycle fitted neatly with a cyclical machine that read cards, summarised their contents and prints a result, rather like a tabulating machine . The language was extended to handle other input and output devices and provides a fast and efficient method of programming. Devices such as the workstation (WORKSTN),
IBM RPG II - Misplaced Pages Continue
2352-410: The end-of-card interrupt (level 4) from the 1442 card reader. The IBM 1800 , announced November 1964, is a variant of the IBM 1130 for process control applications. It uses hardware rather than core memory for the three index registers and features two extra instructions (CMP and DCM) plus extra interrupt and I/O capabilities. It is a successor to the IBM 1710 , as the IBM 1130 is a successor to
2408-504: The first available unused sector, while the others start with sector zero of the disk, making it possible for a programmer unfamiliar with disk organization to inadvertently overwrite the bootstrap loader. Other programming languages available on the 1130 include There is even a French language ALGOL compiler, in which for example " Debut ...Fin; " take the place of " Begin ... End; ". All its messages are in French, so "Bonne compilation"
2464-426: The gap, and then give that name to the temporary file as the new version of the file. Rarely modified files thus migrate towards the start of the disk as new files or new versions are appended, and frequently modified files are stored towards the end of the disk. Working storage starts after the last file in the user area and occupies all the remaining space on the cartridge. It may contain one temporary file created by
2520-487: The interpreter of job control commands and the card reader driver. Device drivers for other I/O devices required by a job are incorporated as part of the loading of that job, which might also include the replacement of the basic disk driver by a more advanced driver. During the execution of a job, only a resident monitor , called the Skeleton Supervisor , resides in memory. This Supervisor requires just 1020 bytes, so
2576-591: The keyboard (KEYBORD), or the console (CONSOLE) do not have a fixed number of records at the beginning of the job and therefore, in order to incorporate the fixed-logic RPG "Last Record" cycle, the LR indicator can be set on with a SETON instruction. LR cannot be set off. RPG II did not evolve much from the 1977 implementation on the System/34 to 2000 when the Advanced/36 was discontinued from marketing. Changes that were made from
2632-610: The limitations of RPG II on the System/3, 32, 34 and 36 including the Advanced/36 was the 64K limit and the number of files you could have in a program. So if you had a lot of programming lines or had large arrays, it was easy to exceed the 64,000 bytes of object code. However, RPG II running on the AS/400 and its follow on iseries and IBM i (those running OS/400 or i5/OS in what is called S/36E (execution environment)) those limits (the 64K bytes and
2688-413: The location specified by the value in Factor 1. SORTA causes the named array to be sorted in place; that is, the elements appear in order. Z-SUB calculates Factor 2 with opposite sign and moved to result field. XFOOT causes an array to be summed and the result moved to result field. MVR must follow a DIV operation. The integer remainder of the DIV operation is placed in the result field. MVR following
2744-531: The meaning of the value contained in a flag will generally be defined in relation to the data structure it is part of. In many cases, the binary value of a flag will be understood to represent one of several possible states or statuses. In other cases, the binary values may represent one or more attributes in a bit field , often related to abilities or permissions, such as "can be written to" or "can be deleted". However, there are many other possible meanings that can be assigned to flag values. One common use of flags
2800-411: The monitor and utilities along with user data, and nonsystem cartridges , which contain user data only. All cartridges contain information on cylinder 0, including the defective cylinder table, cartridge id, and a bootstrap program ( bootstrap code ). On nonsystem cartridges, the bootstrap simply prints an error message and waits if an attempt is made to boot from this cartridge. On a system cartridge this
2856-513: The number of files) were either greatly expanded or removed. In the System/36 implementation of RPG II, there are eight different specification (spec) types, that is a fixed-format line of text, 80 characters (bytes) in length, derived from the original use of punched card input for earlier IBM systems, like the System/3 . Like specifications were grouped together, and each type was required to be in
SECTION 50
#17328630623812912-494: The operating system are a core dump utility, DUMP , and the Disk Utility Program , DUP . A Card/Paper Tape Programming System was available to support systems without disk. There is a hierarchy of device drivers: those with names ending in Z are for Fortran, such as DISKZ, while assembler programmers might use DISK0, and DISK1 was even faster at reading multiple disk sectors. But DISKZ starts its sector addressing with
2968-594: The same electronics packaging, called Solid Logic Technology (SLT), that was used in System/360 . It has a 16-bit binary architecture, as do later minicomputers like the PDP-11 and Data General Nova . The address space is 15 bits, limiting the 1130 to 32,768 16-bit words ( 65,536 bytes ) of memory. The 1130 uses magnetic-core memory , which the processor addresses on word boundaries, using direct, indirect, and indexed addressing modes. IBM implemented five models of
3024-402: The size of working storage will be decreased correspondingly. Flag (computing) In computer programming , flag can refer to one or more bits that are used to store a binary value or a Boolean variable for signaling special code conditions, such as file empty or full queue statuses. Flags may be found as members of a defined data structure , such as a database record , and
3080-459: The system or the user, such as the output of a compiler or an application program. This file is subject to possible deletion at the end of the current job, unless saved to the fixed area or the user area. All disk files are contiguous disk blocks, thus there is no fragmentation . A program can use and modify named files, but can not expand them beyond their created size. A program which creates more than one file must have all but one pre-allocated by
3136-445: The then standard spacing of the text, as drawn from the original usage of punched cards : IBM 1130 The IBM 1130 Computing System, introduced in 1965, was IBM 's least expensive computer at that time. A binary 16-bit machine, it was marketed to price-sensitive, computing-intensive technical markets, like education and engineering, succeeding the decimal IBM 1620 in that market segment. Typical installations included
#380619