Programming in RPG IV, Second Edition - Softcover

Yaeger, Judy

  • 4.00 out of 5 stars
    6 ratings by Goodreads
 
9781583040744: Programming in RPG IV, Second Edition

Synopsis

Bryan Meyers and Judy Yaeger have teamed up to write the RPG IV guide no programmer should be without. The newest edition of this popular textbook/manual has been fully updated through V4R4. New chapters explore in detail the topics of defining data with Definition Specifications and modular programming concepts. This easy-to-understand book gives you a strong foundation in the essentials of business programming and helps you master the latest techniques and features of RPG.

"synopsis" may belong to another edition of this title.

About the Author

Bryan Meyers is familiar to most AS/400 technicians due to his having served as a technical editor and writer for NEWS/400 magazine for many years. Bryan is also an accomplished author and sought-after speaker. His other books include the very popular RPG IV Jump Start, the textbook Control Language Programming for the AS/400 (co-authored by Dan Riehl), and VisualAge for RPG by Example (co-authored by Jef Sutherland). Bryan is vice president of PowerTech Group and heads the company’s The 400 School division.

Judy Yaeger is an associate professor emerita in the business information systems department at Western Michigan University, Kalamazoo, Michigan. She earned her Ph.D. in experimental psychology and an MBA with an emphasis in computer information systems. Before retiring, Judy taught computer programming, including RPG, for more than 15 years at both the community college and university levels. She is currently living in Belize, operating a nature center and lodging facility for budget travelers.

From the Inside Flap

This new edition of Programming in RPG IV includes new chapters that explore in detail the topics of defining data with Definition Specifications and modular programming concepts (including dynamic and static binding, subprocedures and the CALLP operation, and sharing data via data areas), as well as an RPG IV summary appendix and an RPG IV style guide. In addition, all other material throughout the book has been fully updated for Version 4 Release 4.

Programming in RPG IV provides a strong foundation in the essentials of business programming, featuring the newest version of the RPG language: RPG IV. Focusing on real-world problems and down-to-earth solutions, this easy-to-understand textbook will help you master the latest techniques and features of RPG to make you stand out in the highly competitive AS/400 employment market.

The book is designed to give students a thorough understanding of how to use RPG IV effectively in a variety of practical applications. Students experience how to develop an application system of programs to meet the information-processing needs of three different companies.

If you’ve used Dr. Yaeger’s RPG/400 textbook, Programming in RPG/400, you’ll find the transition to this book painless. If you’re a new user, you’ll find that the book provides everything you need to know to write a well-designed RPG IV program. Each chapter builds on the previous ones and includes informative, easy-to-read explanations and examples as well as a section of thought-provoking questions, exercises, and programming assignments that reinforce the knowledge gained from the chapter and strengthen the groundwork for succeeding chapters.

The scope of the book includes the development of RPG; top-down, structured design; RPG IV specifications, operations, and built-in functions; file definition, access, and manipulation; interactive applications; in-depth data definition -- including RPG IV data types, tables, and arrays; modular programming concepts; and a summary of RPG’s fixed-logic cycle and use of indicators -- components of older versions of RPG often encountered on the job in maintenance programming.

Six appendices supplement the material covered in the chapters, providing a summary of RPG IV specifications, keywords, built-in functions, operation codes, and edit codes; an RPG IV style guide; introductions to program development on the AS/400, the basics of SEU, and the process of debugging programs; and the data-file definitions for the assignments. A comprehensive glossary supports the topics and terminology presented throughout the book.

Use Programming in RPG IV today to learn the fundamentals of business programming in RPG IV; use it tomorrow as a convenient, helpful reference.

Excerpt. © Reprinted by permission. All rights reserved.

Chapter 1 Introduction to Programming and RPG

Chapter Overview This chapter introduces you to RPG as a programming language and describes how the language has evolved. It also explains general programming and computer-related concepts that you need to know as you begin learning to program in RPG IV.

Programming Computer programming involves writing instructions for a computer that tell it how to process, or manipulate, data. In many programming languages, these instructions depict a step-by-step procedure needed to produce a specific result or product, such as a sales report. These kinds of languages are called procedural languages. Procedural languages require you to explicitly state each processing step or instruction for the computer. Moreover, you must accurately describe the order or sequence in which the computer is to execute these steps for the program to produce correct results.

The computer is a binary device. Designed with electronic components that can depict only two states -- on and off, or flow of current and no flow -- computers internally store and manipulate instructions (and data) as patterns of bits, or binary digits. 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).

Programs written in HLLs require translation into the bit patterns of machine language before a computer can actually execute their instructions. The computer itself can accomplish this translation using a special program called a compiler. A compiler translates a program written in an HLL 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 filled a niche for providing quick solutions to a common business task: generating reports needed within the business. By designing RPG to be relatively easy to learn and use, IBM set the stage for today s fourth-generation languages (4GLs).

Unlike the procedural languages in use at the time, RPG did not require the programmer to detail each processing step. Instead, the language included a fixed-logic cycle that automatically executed the normal cycle of read-calculate-write found in most report programs. In RPG, the programmer s job was to describe accurately to the computer the files, record layouts, calculations, and output desired for a specific program; the RPG compiler supplied the needed missing steps to provide a standard machine-language program for the computer to execute. RPG required that these descriptive specifications appear in a specific sequence within a program and that entries within a program line appear in fixed locations, or columns, within each line.

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 would 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, 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, in a central data dictionary. 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 define 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 designed programs were causing inefficiencies in program maintenance. Experts attributed much of this inefficiency to spaghetti code -- that is, to programs that included undisciplined, haphazard transfer of control from one part of a program to another.

Advocates of structured design recommended restricting indiscriminate flow of control within a program and using only those operations that kept tight controls on that flow. With this emphasis on structured design, concepts of modular programming and code reusability also began to emerge.

IBM addressed all these trends when it introduced the System/38 minicomputer in 1979. This computer s architecture was unique in that the design of the computer and its operating system featured a built-in database; the S/38 required data files to be predefined at a system level before a program could reference or use those files. This requirement alone forced IBM to release a new version of RPG to allow external file definition. IBM called this version RPG III.

"About this title" may belong to another edition of this title.

Other Popular Editions of the Same Title