Chapter 7: Modern Operation Code Usage


OVERVIEW

Structured programming is a way of life for many programmers. New structure-based and object-oriented languages such as ADA, C++, and Modula-2 are becoming increasingly popular. PL/I, which is one of the most structured programming languages, was developed by IBM during the early '60s and introduced to the data-processing community in 1966. PL/I supports more structured-programming constructs than any other popular language. However, PL/I never made a strong stand in the data-processing community. The exact reasons for this are a matter of controversy, but the most common speculation is that it was just too big. PL/I tried to do too much and be all things to all people. At the time, magnetic media was new and not very dense. Therefore, a "big" language was not practical.

RPG was also developed in the early '60s. It, too, contains most—but certainly not all—structured-programming constructs. There are, however, major differences between PL/I and RPG. One primary difference is size: RPG is a small language. Its code can be considered "tight." It was designed for small diskless machines like the 1400 and 360 model 20.

This chapter describes the use of RPG operation codes in the modern RPG language. The structured constructs such as IF-THEN-ELSE, WHEN DO, DO WHILE , and DO UNTIL are covered in addition to the other operations. Structured operations support the top-down approach to structured program design and development. Additionally, a comparison of the modern RPG language to traditional RPG coding is provided for experienced RPG programmers who are learning the modern RPG language.

Each example in this chapter can be considered a task within a larger program or system. Some are fully functional, and others illustrate a more specific operation.




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