Die Inhaltsangabe kann sich auf eine andere Ausgabe dieses Titels beziehen.
About the Authors,
Acknowledgments,
Preface,
1: Introduction to Programming and RPG,
2: Getting Started,
3: Creating and Using Files,
4: Using Declarations,
5: Controlling Program Workflow,
6: Using Arithmetic Operations and Functions,
7: Processing Character Data,
8: Working with Dates,
9: Accessing and Updating Database Files,
10: Processing Files Using SQL,
11: Using Arrays,
12: Writing Interactive Applications,
13: Calling Programs and Passing Parameters,
14: Building Modular Programs with Procedures,
15: Building and Using Service Programs,
16: Handling Errors,
17: Programming with Subfiles,
18: Working with APIs,
Appendix A: ILE RPG Summary,
Appendix B: Program Development Tools,
Appendix C: Program Testing and Debugging,
Index,
Introduction to Programming and RPG
1.1. 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 ILE RPG.
1.2. Programming
Computer programming involves writing instructions for a computer that tell it how to process, or manipulate, data. No matter how complex a computer application is, its actions are ultimately directed by individual lines of code that operate on input information and generate a result. When you organize and group those individual instructions together, they typically represent a step-by-step process that results in a specific product, such as a sales report. It is a computer programmer's job 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. 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 by using a special program called a compiler. A compiler reads the source code and translates it into machine language that the computer can understand.
1.3. History of RPG
IBM introduced the Report Program Generator (RPG) programming language in the early 1960s. RPG was one of the first HLLs. 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 in most report programs.
The RPG programmer's job was to accurately describe the files, record layouts, calculations, and output desired for a specific program. RPG required that these descriptive specifications appear in a specific 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). A programmer could set the indicators to on or off in one part of the program and then reference their status in another part of the program to specify what processing was to occur.
1.3.1. RPG II
By the late 1960s, RPG had gained popularity, especially in small and midsize data processing departments. Programmers were stretching the language beyond its original intended use, 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. A few 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.
1.3.2. 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 by 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 requirements grew as well. It became apparent that computer professionals had paid too little attention to the initial design of programs. Poorly designed programs were causing inefficiencies in program maintenance. Experts attributed much of this inefficiency to spaghetti code (i.e., programs that included undisciplined, haphazard transfer of control from one...
„Über diesen Titel“ kann sich auf eine andere Ausgabe dieses Titels beziehen.
Anbieter: ThriftBooks-Dallas, Dallas, TX, USA
Paperback. Zustand: Good. No Jacket. Pages can have notes/highlighting. Spine may show signs of wear. ~ ThriftBooks: Read More, Spend Less. Bestandsnummer des Verkäufers G1583473793I3N00
Anzahl: 1 verfügbar
Anbieter: Revaluation Books, Exeter, Vereinigtes Königreich
Paperback. Zustand: Brand New. 5th edition. 576 pages. 10.00x8.00x2.00 inches. In Stock. Bestandsnummer des Verkäufers 1583473793
Anzahl: 1 verfügbar
Anbieter: moluna, Greven, Deutschland
Zustand: New. KlappentextrnrnSince its original publication, Programming in RPG IV has given thousands of students and professionals a strong foundation in the essentials of business programming using RPG IV. Now, the long-awaited Fifth Edition, retitled Prog. Bestandsnummer des Verkäufers 68935693
Anzahl: 5 verfügbar