If you still write RPG code as you did 20 years ago, or if you have RPG ILE on your resume but don&;t actually use or understand it, this book is for you. It will help you transition from the Original Programming Model (OPM) to a more modern, modular, and efficient RPG ILE. With this book, each concept of ILE is made accessible. You will start by taking baby steps with small, easily understandable examples, and build to more complete and complex pieces of code. All the while, you will explore each component of modern RPG, learning how it fits with the other pieces to gain the full RPG ILE picture.By its nature, this book is not an ILE quick-reference guide. Rather, it is a "slow reference guide." It introduces new concepts with analogies to OPM whenever possible, explaining and expanding with realistic scenarios of increasing complexity (like inventory management programs, for instance).The book also goes beyond ILE, with comprehensive chapters about SQL and code organization and structure. Then it goes even further--the final part of the book is dedicated to Modernization:* It shows what can be modernized in your legacy applications and how to do it;* Explains different approaches to the issue, discussing the pros and cons of each one; and* Sets a few sound guidelines and offers advice on how to proceed, based on the author's and other several experts' experience.By the end of the book, you'll be a better programmer. You'll have new tools, new approaches, and most importantly, new ideas, to solve those problems big and small that are the life of an RPG programmer.Upon completion of this book, you will be able to: * Migrate your OPM code to ILE RPG in a structured and easier-to-maintain way.* Write code in free-format RPG.* Use built-in functions to solve hard-to-tackle and/or time-consuming issues.* Get a comprehensive knowledge about SQL and how it can be useful to an RPG programmer.* Learn about SQL's stored procedures and user-defined functions concepts and how to use them to modernize your application.* Understand the possibilities that embedded SQL in RPG offers.* Use SQL cursors to replace OPNQRYFs.* Understand how you can modernize your legacy applications.* Use SQL's Data Definition Language to replace DDS-defined physical and logical files, which can bring system performance and programmer productivity gains.* Learn about the MVC and how it can help revolutionize your application's user interface.* Become a "modern RPG" programmer, with a new set of skills and tools.
Die Inhaltsangabe kann sich auf eine andere Ausgabe dieses Titels beziehen.
Rafael Victória-Pereira has more than 16 years of IBM i experience, as a programmer, analyst, and manager. Over that period, he has been an active voice in the IBM i community, encouraging and helping programmers transition to ILE and free-format RPG. Rafael has written more than 50 technical articles about topics ranging from interfaces--the topic for his first book "Flexible Input Dazzling Output"--to modern RPG (particularly, the popular RPG Academy Tech Tip Series) and SQL (the new and successful SQL 101 Tech Tip Series). He writes in a down-to-earth, easy-to-read, practical style that's highly popular with his audience of IBM technology professionals.Rafael currently works as an Enterprise Architect at the Luis Simões Group in Portugal. His areas of expertise include programming in the IBM i native languages (RPG, CL, and DB2 SQL) and "modern" programming languages, such as C# and Python, as well as project management and consultancy.
Acknowledgments,
Introduction,
PART 1: ILE BASICS,
Chapter 1: Modules, Programs, and Service Programs,
Chapter 2: Binding It All Together,
Chapter 3: Procedures: How, When, and Why to Build Them,
Chapter 4: Improve Your Code's Readability with Functions,
Chapter 5: All About Parameters,
PART 2: TAKING ADVANTAGE OF ILE,
Chapter 6: BIF Up Your Code!,
Chapter 7: Code Organization Strategies,
Chapter 8: /FREE Your Code!,
Chapter 9: No More ISDB Nightmares: Meet the New ILE Debugger,
Chapter 10: The Latest and Greatest News for RPG,
Chapter 11: SQL in a Nutshell,
PART 3: BEYOND ILE — START MODERNIZING YOUR APPLICATIONS,
Chapter 12: Modernizing Your Applications: Why, What, Where, and How,
Chapter 13: Database Modernization,
Chapter 14: UI Modernization and the MVC Concept,
Modules, Programs, and Service Programs
How do you create an OPM RPG program? You write your source, compile it with PDM's option 14, and (after you've squashed all those annoying little bugs) you get a *PGM object that you can execute.
ILE uses a similar process, but includes an intermediary step. To create an ILE program, you compile your source not into a program as you would in OPM, but into a module, and then you create your program.
Why the additional step of creating a module for the same source code?
The extra step actually introduces some advantages. Breaking your code into smaller pieces (modules) assures faster compile times and reusability of code. (You'll see a practical example of this later in this chapter.) You can also copy modules, moving them from one system to another. This ability to distribute and reuse modules opens the possibility that third parties could sell specialized modules or groups of modules to provide functions that you might not be willing or able to write on your own.
Since RPG has an interestingly active community, you can get many specialized modules for free. Websites like MC Press Online (www.mcpressonline.com/) often present procedures and functions (explained in chapter 3) custom-built but easily adapted for certain goals. For example, you could buy (or obtain for free) a set of financial procedures/functions written in C, and then piece them together into usable programs, even if you don't have a C compiler — or maybe any compiler at all. Even if you never learn a single line of C, you can still take advantage of C's ability to handle complex math expressions by linking an ILE C module with your ILE RPG modules. (Again, I'll explain this concept of "linking" or "binding" later.)
Yes, you read it right: an ILE C module can work seamlessly side by side an ILE RPG module. That's the beauty of ILE!
A Typical OPM Scenario
Back to the topic at hand: the typical OPM RPG program consists of an all-in-one block of code. This code contains a group of subroutines to handle the screen (if the program has one), another group to handle the necessary validations, and in really well- organized code, a subroutine or two to handle the database interactions. If the code is not that well-organized, or if it's a relic from the 1980s, it might contain a single huge block of code, loaded with GOTOs, labels, and a primary cycle.
This code, or at least part of it, probably exists in some other pr
„Über diesen Titel“ kann sich auf eine andere Ausgabe dieses Titels beziehen.
Anbieter: ThriftBooks-Atlanta, AUSTELL, GA, USA
Paperback. Zustand: Fair. No Jacket. Readable copy. Pages may have considerable notes/highlighting. ~ ThriftBooks: Read More, Spend Less. Artikel-Nr. G1583474250I5N00
Anzahl: 1 verfügbar
Anbieter: ThriftBooks-Atlanta, AUSTELL, GA, USA
Paperback. Zustand: Very Good. No Jacket. May have limited writing in cover pages. Pages are unmarked. ~ ThriftBooks: Read More, Spend Less. Artikel-Nr. G1583474250I4N00
Anzahl: 1 verfügbar