Preface


In 1974, at the request of my father who had a friend in the computer industry since the early 1960s, I signed up for an introduction-to-computer-programming course. The first semester of the course was spent discussing the financial benefits of being in the computer industry over other types of business. I debated with the instructor quite often, arguing that money isn't everything and that becoming an astronaut was what I really wanted to do.

Needless to say, the instructor felt I was unqualified to attend the second semester (this was high school after all). However, after six months of negotiating with the instructor (I think my mother called him), I attended the course during the second semester of the next school year.

In that course, I was exposed to the syntax of COBOL. It looked simple, similar to English, but then again, maybe not.

I spent hours, days, even weeks carefully drawing flowcharts and diagrams as well as keypunching COBOL statements into 80-column punch cards on an IBM 029 keypunch machine. It wasn't the best way to do homework, but it was the only way we had.

Even back then, everyone was required to backup their programs. The only way for a student to backup a program (since no disk space was allocated for student use) was to use the duplicator to punch a second set of 80-column punch cards. Carrying all that paper meant toting your homework around in a wheelbarrow. (I think COBOL programs, punched onto 80-column cards, are what started deforestation.) Imagine the frustration I had the day I spilled my 1000-line COBOL program made up of those 80-column cards!

In college, in late 1976, I signed up for two computer-language classes, "FORTRAN IV with WATFOR and WATFIV," and "RPG with RPG II for S/370 and S/3." The FORTRAN class was the most interesting—scientific formulas, mathematical expression, subprograms, and brevity—a pleasant change from COBOL. On the other hand, I considered the RPG class to be an "it's-a-language-so-I'll-take-it" experience. After all, by knowing FORTRAN and COBOL, I was set for life.

Shortly after classes began, I took a job as a Computer Operator working with the IBM System/32. I was awed that, unlike my college courses, businesses could actually run programs without compiling them each time. "What power!" I thought naively. Because the column IBM System/32 used RPG as its primary language, I figured that RPG must be the greatest language to use for business programs. I began reading the System/32 RPG II reference manual.

From my FORTRAN and COBOL background, I quickly recognized the perform subroutine (EXSR) operation and used it for all of the assignments in my college course. When I turned in one of my assignments, it included a single "main-line" calculation—the EXSR operation—and the remainder of the program was written with subroutines and the now pass RPG cycle. My self-indulged modular programming style seemed to baffle the instructor. As he pointed to the EXSR operation, the instructor's first question was, "What's that?" followed by, "Why did you use it?"

That day I learned that people who are authorities or who are perceived to be authorities on various subjects often know far less than we think they do. If someone is considered an authority or expert, it simply means they are a person who:

  1. Has practiced the subject or profession long enough for others in the profession to notice.

  2. Is willing to act as a cornerstone for building and sharing knowledge on the subject.

It doesn't mean they know everything about the subject.

Textbooks contain the knowledge of an individual or group of individuals (authors) on a specific subject. Textbooks can assist in the act of gathering knowledge by presenting the collective knowledge of others. The art of learning is up to you.

THE EVOLUTION OF RPG

In 1960, someone had the inspiration to develop a computer programming language that would replace the manually wired jumper boards of an IBM 1400 business machine. The jumper boards were position-oriented. The designers of this new language used these wired jumper boards as an element in designing the language. The resulted was the Report Program Generator (RPG) language.

In 1964, RPG was upgraded to a more usable language. This improvement coincided with the announcement of the IBM 360 model 20. While RPG did a fine job of handling 80-column cards, it couldn't handle tape or disk processing, not to mention display devices—which were just being introduced.

The RPG cycle (the processes during which an RPG program automatically reads a record and performs certain routines) was at the heart of file processing. Unlike other high-level languages, RPG didn't require extensive file declarations for opening and closing files, nor did it require a complex list of instructions to simply print data. The RPG cycle handled these tasks automatically.

In 1969, RPG II, along with a new mini-computer called the IBM System/3, was announced. RPG II had all the features of the original RPG, plus disk processing. In the 1970s limited support for workstation devices (i.e., dumb terminals) was added for System/3 workstation display devices and the newly available System/34 computer.

In 1978, RPG III was announced for a new mini-computer, the IBM System/38. The System/38 was a replacement for the IBM System/3, and was built in case the U.S. Government broke IBM into separate companies. The System/38 would have been the flagship system for the new mid-sized computer system company. Of course the antitrust suit ended and, as we all know, IBM stayed as one company.

The System/38 was the most advanced general-purpose computer of its day. It was the first with a built-in relational database management system. RPG III added a host of new functions beyond RPG and RPG II, among them a nearly complete set of structured programming operations (e.g., IF-THEN-ELSE, DO). With these new features, the benefit of the RPG cycle grew thin. Today, the RPG cycle exists more for compatibility with older systems. The use of the cycle typically is avoided because of structured and modular programming practices.

In 1985, RPG III was enhanced to include support for and/or logic within IF and DO operations. This support greatly enhanced program readability and greatly decreased programmer frustration levels and RPG II became a well entrenched, mainstream programming language.

In 1988, the IBM AS/400 was announced and with it a new compiler called the AS/400 RPG/400 compiler. That RPG/400 compiler supports four versions of the RPG language:

  1. System/38-compatible RPG III.

  2. System/36-compatible RPG II.

  3. SAA RPG Level 1.

  4. AS/400-compatible RPG III.

By late 1989, IBM quietly dropped the SAA concept, including SAA RPG.

In 1995, IBM introduced the first significant update to the RPG language in over 15 years—RPG IV. RPG IV marked the first time the RPG specifications have changed significantly. RPG IV has eliminated virtually all the limitations of previous versions of RPG. With RPG IV, IBM has added natural expressions, long field names, more data types, including native date and time data type fields, and subprocedures. In addition, the RPG programmer now has a choice which type of syntax they prefer. The traditional fixed-format syntax with Factor 1, Factor 2, and a Result field and operation code, or a new syntax that is similar to, but still slightly different from many other programming languages, such as PL/I and C.

The latest version of RPG is, by far, the best ever. It is easier to learn and offers a rich set of functions for day-to-day, general-purpose business applications.




The Modern RPG IV Language
The Modern RPG IV Language
ISBN: 1583470646
EAN: 2147483647
Year: 2003
Pages: 156
Authors: Robert Cozzi

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net