Recently revised and updated, this informative reference gives students and professionals a strong foundation in the essentials of business programming using RPG IV. Complete with numerous programming examples and support material, this account covers a variety of topics, including program development process, RPG IV specifications and operations, top down structured design, database definition and processing, interactive applications, and modular programming. Comprehensive and compatible with IBM i Release 5.4, 6.1, 7.1 and later releases, this manual will equip academics with the necessary tools to create highly effective and maintainable RPG IV programs using the latest techniques.
Die Inhaltsangabe kann sich auf eine andere Ausgabe dieses Titels beziehen.
Jim Buck is a programmer with more than 25 years of experience, an analyst instructor at Gateway Technical College, and the president of the Wisconsin Midrange Computer Professional Association. He is the coauthor of Control Language Programming for the IBM i and the recipient of the 2007 IBM System i Innovation-Education Excellence Award. He lives in Kenosha, Wisconsin. Bryan Meyers is the author of numerous books, including Desktop Guide to CL Programming, RPG IV Jump Start, and VisualAge for RPG. He lives in Billings, Montana.
Title Page,
Copyright Page,
Dedication,
Acknowledgments,
Preface,
Chapter 1 - Introduction to Programming and RPG,
Chapter 2 - Getting Started,
Chapter 3 - Externally Described Files,
Chapter 4 - Defining Data with Definition Specifications,
Chapter 5 - Using Arithmetic Operations and Functions,
Chapter 6 - Processing Character Data,
Chapter 7 - Working with Dates,
Chapter 8 - Controlling Program Workflow,
Chapter 9 - Using Arrays and Tables,
Chapter 10 - Accessing and Updating Database Files,
Chapter 11 - Writing Interactive Applications,
Chapter 12 - Calling Programs and Passing Parameters,
Chapter 13 - Building Modular Programs with Procedures,
Chapter 14 - Handling Errors,
Chapter 15 - Programming with Subfiles,
Appendix A - RPG IV Summary,
Appendix B - RPG IV Style Guide,
Appendix C - Program Development Tools,
Appendix D - Program Testing and Debugging,
Appendix E - Maintaining the Past,
Appendix F - Data Files,
Introduction to Programming and RPG
Chapter Overview
This chapter introduces you to RPG and describes its history and evolution from punched cards to a modern business programming language. It also explains general programming and computer-related concepts that you need to know as you begin to program in RPG IV.
Programming
Computer programming involves writing instructions that tell a computer exactly how to process, or manipulate, data. No matter how complex a computer application may be, its actions are ultimately directed by individual lines of code that operate on input information and generate a result. When those individual instructions are organized and grouped together, they typically represent a step-by-step process that will result in a specific product, such as a sales report. It is the job of a computer programmer to design, organize, write, and test those individual lines of code, creating a working computer program as the end result.
The computer is a binary device, with electronic components that can depict only two states: on and off, or flow of current and no flow of current. To represent those states, computers internally store and manipulate instructions (and data) as patterns of bits, or binary digits, with values of 1 or 0. Programmers originally were forced to write computer instructions as strings of 1s and 0s, using machine language. Humans, however, do not function as well at this low-representation level. Fortunately, advances in computer science soon led to the development of high-level languages (HLLs).
A high-level language allows a programmer to write computer instructions in a format and syntax that is more easily recognizable than long strings of 1s and 0s. This HLL source code is stored in a file on the computer. But before the computer can actually execute the instructions, they must be translated into the bit patterns that the computer can recognize. The computer itself can accomplish this translation using a special program called a compiler. A compiler reads the source code and translates it into machine language that the computer can understand.
History of RPG
IBM introduced the Report Program Generator (RPG) programming language in the early 1960s. RPG was one of the first high-level languages. It filled a niche for providing quick solutions to a common business task: generating reports needed within the business. RPG was unique among computer languages in several respects.
RPG is a procedural language. Procedural languages typically require that you explicitly code each processing step or instruction, in the correct sequence, to define the procedure or process necessary for the computer to produce the end result. Unlike other procedural languages, RPG did not require the programmer to detail each processing step. Instead, the language included a fixed logic cycle that automatically executed the normal read–calculate–write process found in most report programs.
The RPG programmer's job was to describe accurately the files, record layouts, calculations, and output desired for a specific program. RPG required that these descriptive specifications appear in a specific designated sequence within a program and that entries within each specification line appear in fixed locations, or columns. The programmer typically coded these specifications onto paper hole-punch cards, a deck of which formed the source code for a program. The RPG compiler read that card deck and, through its logic cycle, supplied the needed missing steps to provide a standard machine language program for the computer to execute.
Another unique characteristic of RPG was its use of a special class of built-in variables called indicators. These variables, many of which simply had numbers for names, were predefined to the computer and could have only one of two values: '1' or '0' (corresponding to "on" or "off"). The indicators could be set on or off in one part of the program; their status could then be referenced in another part of the program to determine what processing was to occur.
RPG II
By the late 1960s, RPG had gained popularity, especially in small and midsized data-processing departments. Programmers were stretching the language beyond its original intended use and using RPG for complex computations and complicated file updating as well as for report generation.
Accordingly, IBM introduced an enhanced version of the language — RPG II — when it released its System/3 computer. Other computer vendors observed the popularity of RPG and developed RPG II compilers for their minicomputers — but for the most part, RPG remained a language associated with IBM installations.
RPG III
During the 1970s, several trends in data processing became apparent. First, as computers became less expensive and more powerful and as operating systems became more sophisticated, interest in interactive programs began to mushroom. In interactive applications, a user interacts directly with the computer through a terminal or workstation to control the actions of a computer program as it is running. Previously, programs had involved only batch processing, in which the computer processes a "batch" of data (typically representing business transactions) without user intervention.
A second emerging trend was a growing interest in a database approach to data management. With a database approach, programmers define data independently of programs, using a database design tool, such as Structured Query Language (SQL). The files storing the data are rigorously designed and organized to minimize redundancy and to facilitate accessing data stored in separate files. Any program can use these database files without having to explicitly define the details of the data within the program itself.
Finally, a third trend during that decade was an increasing concern with program design. This trend resulted in a methodology called structured design. As companies' libraries of developed programs continued to grow, the need to revise those programs to fit evolving business needs grew as well. It became apparent that computer professionals had paid too little attention to the initial design of programs. Poorly...
„Über diesen Titel“ kann sich auf eine andere Ausgabe dieses Titels beziehen.
Anbieter: Revaluation Books, Exeter, Vereinigtes Königreich
Paperback. Zustand: Brand New. 4th edition. 554 pages. 10.25x8.50x1.25 inches. In Stock. Artikel-Nr. 1583473556
Anzahl: 1 verfügbar