Die Inhaltsangabe kann sich auf eine andere Ausgabe dieses Titels beziehen.
Title Page,
Copyright Page,
Dedication,
Acknowledgments,
1 - Pre–Free-Format RPG IV,
2 - Introducing Free-Format RPG IV,
3 - Input/Output Using Free Format,
4 - Program Flow Using Free Format,
5 - Data-Manipulation Operations Using Free Format,
6 - Math Operations in Free Format,
7 - Call and Return in Free Format,
8 - Solutions for Problem Situations,
9 - The Case for Free-Format RPG,
10 - Sample Programs,
A - Free-Format Operations,
B - Additional Elements Used by the Sample Programs,
C - Free-Format Alternatives for Fixed-Format Operations,
Pre–Free-Format RPG IV
The RPG programming language has certainly come a long way since its introduction as a simple report program generator in the 1960s. From the earliest versions of RPG to the latest release of free-format RPG IV on IBM's eServer iSeries (now i5) platform, the changes have been dramatic.
The centerpiece of today's RPG is its support for a free-format style of calculation coding. Free format puts RPG on the map of modern programming languages and gives programmers important new functionality for constructing programs that are easier to create, understand, and maintain. If you're writing RPG programs today, you owe it to yourself to make the most of this great new function.
In this book, you'll learn the ins and outs of free-format RPG, from I/O and program flow to data manipulation, math operations, and call and return. But before we dive into the delights of free-format RPG, let's take a brief look at its precursor: fixed-format RPG IV.
RPG IV
Even before free format, RPG IV was a powerful, functionally rich programming language. RPG IV — or ILE RPG, as it's officially known — debuted in late 1994 with Version 3 Release 1 (V3R1) of the OS/400 operating system. IBM had introduced the Integrated Language Environment (ILE) in a prior release, but everyone eagerly awaited RPG's entrée into ILE. Three major additions to RPG in V3R1 brought the language a significant level of sophistication that was previously absent: the extended Factor 2, built-in functions, and subprocedures.
Extended Factor 2
The introduction of the extended Factor 2 format, along with operations to exploit it, represented a huge departure from RPG's past. With this enhancement to calculation specifications, RPG programmers could begin to use operations such as Eval (Evaluate expression) and If (If) with long expressions.
The ability to use math symbols (+, -, *, /) within expressions was a major step in modernizing the language. Other symbols, used in comparison expressions, included equal (=), less than (<), greater than (>), less than or equal (<=), greater than or equal (>=), and not equal (<>). The exponentiation symbol (**) became the newest math operator, and support for parentheses let programmers indicate higher precedence in math or comparison expressions. Other programming languages had used these symbols for a while, and IBM chose to bring them into its new version of RPG.
One of the symbols, the plus sign (+), found an additional use in RPG IV: concatenation. Using this new operator, RPG programmers could put character data together into strings much more easily than with previous methods.
Built-in Functions
iSeries programmers were already familiar with built-in functions through their use of such functions in CL, OS/400's control language. The %Sst (substring) and %Bin (binary) functions, for example, are commonly used CL built-in functions.
The whole idea of an RPG IV built-in function was based on the C language's concept of a function. A built-in function performs one task, with or without parameters, and usually returns data of a predetermined data type to the point in the program where the function was specified. For example, RPG IV's %Eof built-in function checks for end-of-file after a Read operation, eliminating the need to code a resulting indicator on the Read. The %Found built-in function lets you check for a record-found condition after a Chain operation without using a resulting indicator.
The number of built-in functions available in RPG has grown from the dozen or so provided in RPG IV's initial release to 76 as of V5R3. Many of these "built-ins" duplicate the function of older operation codes, such as Scan (built-in function %Scan) and Subst (built-in function %Subst). In some cases, the built-in function provides more capabilities than the operation code it replaces. For example, the %Subst built-in function can substring a target as well as a source string, whereas the Subst (Substring) operation code can substring only a source string.
Subprocedures
As if these new capabilities weren't enough, IBM added another powerful feature to RPG IV. Support for subprocedures gives RPG IV programmers the option to break complex programs into smaller parts and to create "homegrown" built-in functions if desired. For the first time in RPG, IBM introduced the concept of a local variable for use in subprocedures. Also for the first time, a routine — in this case, a subprocedure — could use recursion.
Other Changes
In RPG IV, IBM also eliminated many of the old constraints of RPG/400 (RPG IV's predecessor). Eight-character file and record names were lengthened to 10. Field name lengths were increased, too — at first to 10 and then to 4,096! The maximum size of character fields grew from 256 bytes to 32,767. Packed-numeric field size was raised to 30 and then 31 digits; it now stands at 63.
Even fans of binary and hexadecimal programming got something new in RPG IV. Previously, you could convert two-byte binary numbers to four-digit decimal numbers and convert four-byte binary numbers to nine digits. The new RPG IV language provided an integer data type, both signed and unsigned, up to 20 digits. To handle ultra-small and ultra-large numbers, the floating point data type made its debut, in both standard and double precision.
Other data types added to the language include the pointer data type, which contains the address of data or a procedure; the object data type, used to handle references to a Java object; and the date, time, and timestamp data types.
Adding these new data types and enlarging the older ones must have come from some greater motivating factor. Why did IBM provide all these things? In my opinion, the reasons lay in maintaining the iSeries as a modern and viable solution for the midrange server marketplace. Older RPG can easily be called a "dinosaur" in this modern age. The gap in programming capabilities between older RPG and modern languages such as C, C++, Java, and others was huge. With today's RPG IV, there is no gap. RPG IV has "come from behind" to be a major player in the modern world of application development.
Some "Baggage" That Came Along
Like any responsible vendor, IBM doesn't like to offend any of its customers. If you wrote an RPG program in 1969 that used the RPG cycle and 99 indicators, IBM won't tell you today that your approach is obsolete. Instead, IBM continues to provide a compatibility path from the "here and now" back to almost any previous time in RPG's history. The machines may change every six to eight years, but programs and the inherent investment made in developing them are preserved....
„Über diesen Titel“ kann sich auf eine andere Ausgabe dieses Titels beziehen.
Anbieter: World of Books (was SecondSale), Montgomery, IL, USA
Zustand: Good. Item in good condition. Textbooks may not include supplemental items i.e. CDs, access codes etc. Artikel-Nr. 00109758077
Anzahl: 1 verfügbar
Anbieter: ThriftBooks-Atlanta, AUSTELL, GA, USA
Paperback. Zustand: Good. No Jacket. Pages can have notes/highlighting. Spine may show signs of wear. ~ ThriftBooks: Read More, Spend Less. Artikel-Nr. G1583470557I3N00
Anzahl: 1 verfügbar
Anbieter: Better World Books, Mishawaka, IN, USA
Zustand: Good. Pages intact with minimal writing/highlighting. The binding may be loose and creased. Dust jackets/supplements are not included. Stock photo provided. Product includes identifying sticker. Better World Books: Buy Books. Do Good. Artikel-Nr. 38925201-6
Anzahl: 1 verfügbar
Anbieter: WorldofBooks, Goring-By-Sea, WS, Vereinigtes Königreich
Paperback. Zustand: Very Good. The book has been read, but is in excellent condition. Pages are intact and not marred by notes or highlighting. The spine remains undamaged. Artikel-Nr. GOR008427697
Anzahl: 1 verfügbar