| The
new edition of this award-winning textbook contains 14 information-packed
chapters, each with practical programming assignments. It begins with an
overview for programmers new to the field to ensure that they have the
essential building blocks they need. The author builds on these in
succeeding chapters, giving students a thorough understanding of how to
use RPG/400 efficiently in a variety of applications. Heavy emphasis is
placed on top-down, structured programming. In a new chapter and a new
appendix, Dr. Yaeger provides a transition from RPG/400 to RPG IV. You'll
find out about the features of RPG/400 that will not work with the ILE
RPG/400 compiler and the features that may be used but aren't required.
Table of Contents
Preface
Chapter 1: Introduction to Programming and RPG
Chapter Overview
Programming
History of RPG
Program Variables
Data Files and the Data Hierarchy
Programming Specifications
The Program Development Cycle
Program Entry and Testing
Chapter Summary
Terms
Discussion/Review Questions
Exercises
Chapter 2: Getting Started
Chapter Overview
Specifications Forms in RPG
Program Specifications for Example Program
File Description Specifications
Input Specifications
Record Identification Entries
Field Description Entries
Output Specifications
Record Identification Entries
Field Description Entries
Calculation Specifications
Indicators and Calculations
RPG Operations
Internal Documentation
The Completed Program
Output Editing
Edit Codes
Edit Words
Chapter Summary
Terms
Discussion/Review Questions
Exercises
Programming Assignments
Chapter 3: Arithmetic and Assignment Operations
Chapter Overview
Numeric Literals and Fields
Arithmetic Operations
Numeric Truncation and Field Sizes
Result Field Size for Addition
Result Field Size for Subtraction
Result Field Size for Multiplication
Result Field Size for Division
Rounding
Effective Commenting on Calculations
Putting It All Together
Assignment Operations
Character Literals
Figurative Constants
Chapter Summary
Terms
Discussion/Review Questions
Exercises
Programming Assignments
Chapter 4: Top-Down, Structured Program Design
Chapter Overview
Structured Design
Sequential Flow of Control
Relational Comparisons
Selection Operations
IF and Page Overflow
Operations for Iteration
Loops and Early Exits
Unstructured Operations
Top-Down Design
Defining Subroutines
Scope Terminators
Control-Break Logic
Chapter Summary
Terms
Discussion/Review Questions
Exercises
Programming Assignments
Chapter 5: Externally Described Files
Chapter Overview
The AS/400 Approach to Database Files
Physical and Logical Files
Introduction to DDS
Defining Physical Files
Data Types and Data Storage
Defining Logical Files
Simple Logical Files
Record Selection/Omission
Logical Files with Multiple-Record Formats
Join-Logical Files
Creating Database Files
RPG Programming with Externally Defined Files
Additional Database File Concepts
Externally Described Printer Files
Putting It All Together
Chapter Summary
Terms
Discussion/Review Questions
Exercises
Programming Assignments
Chapter 6: File Access and Record Manipulation
Chapter Overview
Operations for Input Files
Sequential Access
Random Access
Referencing Composite Keys
Operations for Output Files
Update Files and I/O Operations
File and Record Locking
I/O Errors
Chapter Summary
Terms
Discussion/Review Questions
Exercises
Programming Assignments
Chapter 7: Interactive Applications
Chapter Overview
Batch and Interactive Programs
Display Files
Additional DDS Keywords
File-Level Keywords
Record-Level Keywords
Field-Level Keywords
Conditioning Indicators
Interactive File Maintenance
Screen Design and CUA
Chapter Summary
Terms
Discussion/Review Questions
Exercises
Programming Assignments
Chapter 8: Tables and Arrays
Chapter Overview
Tables
Table Definition
Compile-Time Tables
Pre-Runtime Tables
Table Look-Ups
Two Related Tables
Multiple Related Tables
Range Tables
Changing Table Values
Arrays
Runtime Arrays and Input Data
Calculations with Arrays
Using Arrays
Array Look-Ups
Indicators as Array Elements
Output with Arrays
Chapter Summary
Terms
Discussion/Review Questions
Exercises
Programming Assignments
Chapter 9: Advanced Data Definition
Chapter Overview
Named Constants
*LIKE DEFN (Field Definition)
Data Structures
Simple Data Structures
Multiple-Occurrence Data Structures
Initialization and Reinitialization of Variables
File-Information Data Structures
Program-Status Data Structures
Error Handling and *PSSR
Chapter Summary
Terms
Discussion/Review Questions
Exercises
Programming Assignments
Chapter 10: Interactive Programs: Advanced Techniques
Chapter Overview
Subfiles
Subfile Record Formats
Subfile Control-Record Formats
Loading the Entire Subfile
Loading the Subfile a Page at a Time
Subfiles and Change
Uses of Subfiles
On-Line Help
Chapter Summary
Terms
Discussion/Review Questions
Exercises
Programming Assignments
Chapter 11: Byte- and Bit-Level Operations
Chapter Overview
Field Character Inspection
Field Character Manipulation
Using Arrays for String Manipulation
Working with Bits
Chapter Summary
Terms
Discussion/Review Questions
Exercises
Programming Assignments
Chapter 12: Interprogram Communications
Chapter Overview
Modular Programming
Calling Programs
Passing Data Between Programs
Calling QCMDEXC
Data Areas
Data-Area Data Structures
Using *NAMVAR DEFN
Chapter Summary
Terms
Discussion/Review Questions
Exercises
Programming Assignments
Chapter 13: Looking Backward: RPG II
Chapter Overview
RPG II: An Initial Look
RPG's Fixed-Logic Cycle
The Fixed-Logic Cycle and Control Breaks
Decisions in RPG II
Resulting Indicators and Arithmetic
Iteration and RPG II
Chapter Summary
Terms
Discussion/Review Questions
Exercises
Programming Assignments
Chapter 14: Looking Forward: RPG IV
Chapter Overview
Introduction to RPG IV
Modifications to File Specifications
Modifications to Extension Specifications
Introducing Definition Specifications
Modifications to Input Specifications
Modifications to Calculation Specifications
Modifications to Output Specifications
Putting It All Together
Pseudocode for Invoice Program
Chapter Summary
Terms
Discussion/Review Questions
Exercises
Programming Assignments
Appendix A: Developing Programs on the AS/400
The Programmer Menu
Programming Development Manager (PDM)
Appendix B: Source Entry Utility (SEU)
SEU Overview
Using Prompts
Working Within the Edit Display
Function Keys in SEU
SEU's Command Line
Working with a Split Screen
Exiting SEU
Appendix C: Program Testing and Debugging
Syntax Errors
Logic Errors
Runtime Errors
Diagnosing Abends
Diagnosing Infinite Loops
Output Errors
Detecting Output Errors
Correcting Output Errors
Debug
Breakpoints
Trace Commands
Appendix D: Data Files
Case 1: CompuSell
Case 2: Wexler University
Case 3: GTC, Inc.
Miscellaneous Files
Appendix E: RPG IV and RPG/400
Chapter 1 Modifications
Chapter 2 Modifications
Chapter 3 Modifications
Chapter 4 Modifications
Chapter 5 Modifications
Chapter 6 Modifications
Chapter 7 Modifications
Chapter 8 Modifications
Chapter 9 Modifications
Chapter 10 Modifications
Chapter 11 Modifications
Chapter 12 Modifications
Chapter 13 Modifications
Glossary
Index
 |
Judy
Yaeger is an associate professor emerita in the business
information systems department at Western Michigan University,
Kalamazoo, Michigan. She earned her PhD in experimental psychology
and an MBA with an emphasis in computer information systems. Judy
taught computer programming, including RPG, for more than 15 years
at both the community college and university levels before retiring.
She is currently living in Belize, operating a nature center and
lodging facility for budget travelers. |
|