| |
| |
Preface | |
| |
| |
The Evolution of RPG | |
| |
| |
Who Should Read This Book | |
| |
| |
Which Version of RPG is Covered | |
| |
| |
Names are Important | |
| |
| |
| |
Introduction | |
| |
| |
Position-Oriented Program Specifications | |
| |
| |
A Brief Language | |
| |
| |
Specification Types | |
| |
| |
RPG Components | |
| |
| |
RPG Limitations | |
| |
| |
Naming Conventions | |
| |
| |
Data Types | |
| |
| |
Indicators | |
| |
| |
Indicator Usage | |
| |
| |
Function Key Attention Identification Byte | |
| |
| |
Indicator Classification | |
| |
| |
Indicators to Avoid | |
| |
| |
Constants and Literal Values | |
| |
| |
Operation Code Arguments | |
| |
| |
Output Control Values | |
| |
| |
Subroutine Return Points | |
| |
| |
Directives | |
| |
| |
| |
Specification Formats | |
| |
| |
Specification Types | |
| |
| |
Header (Control) Specification | |
| |
| |
File Specification | |
| |
| |
Definition Specification | |
| |
| |
Input Specification | |
| |
| |
Input Specification Summary | |
| |
| |
Calculation Specification | |
| |
| |
Output Specification | |
| |
| |
Procedure Specification | |
| |
| |
Editing Numeric Output | |
| |
| |
Date Edit Code Control Summary | |
| |
| |
Table and Array Specification | |
| |
| |
| |
Expressions | |
| |
| |
Expressions in RPG | |
| |
| |
Natural Expressions | |
| |
| |
| |
Built-In Functions | |
| |
| |
Built-In Function Syntax | |
| |
| |
Built-In Function Syntax Summary | |
| |
| |
| |
Operation Codes | |
| |
| |
Abbreviations Used Throughout This Chapter | |
| |
| |
Operation Code Summary | |
| |
| |
Unconditionable Operation Codes | |
| |
| |
Date and Time Format Codes | |
| |
| |
Date and Time Duration Codes | |
| |
| |
Operation Extender Cross-Reference | |
| |
| |
RPG IV Operation Code Summary Syntax Diagram Legend | |
| |
| |
Operation Code Syntax Diagrams | |
| |
| |
Boolean Operation Codes | |
| |
| |
Free-Format Operation Codes | |
| |
| |
Natural Expression Operation Codes | |
| |
| |
Program Status Codes | |
| |
| |
File-Status Error Codes | |
| |
| |
Nested Code Illustration | |
| |
| |
| |
Program Organization | |
| |
| |
Source File Location | |
| |
| |
Source File Member Contents | |
| |
| |
Module Definition | |
| |
| |
Scope | |
| |
| |
Static and Automatic Storage | |
| |
| |
| |
Modern Operation Code Usage | |
| |
| |
Optimizing | |
| |
| |
Do Loops | |
| |
| |
Compare and Branch | |
| |
| |
Compare Operation | |
| |
| |
Ranges, Lists, and Select/Omit | |
| |
| |
RPG IV Style | |
| |
| |
| |
Structured Programming | |
| |
| |
The Structured Approach | |
| |
| |
The If-Then-Else Structure | |
| |
| |
The Case Structure | |
| |
| |
| |
Inter-Module Communication | |
| |
| |
Benefits of Modular Programming | |
| |
| |
Common Techniques for Inter-Module Communication | |
| |
| |
Prototyped Call | |
| |
| |
Data Structures and Prototyped Procedures | |
| |
| |
Data Areas | |
| |
| |
| |
Procedures | |
| |
| |
User-Written Procedures | |
| |
| |
Calling a Procedure | |
| |
| |
Procedure Definition | |
| |
| |
Prototyped Procedure Keywords | |
| |
| |
Program Entry Point | |
| |
| |
A System Interface for Procedures | |
| |
| |
| |
File Processing | |
| |
| |
Full-Procedural File Processing | |
| |
| |
Physical Files | |
| |
| |
Logical Files | |
| |
| |
File Access | |
| |
| |
Access Path Processing | |
| |
| |
Workstation Device File Processing | |
| |
| |
Chain (Random File Access) | |
| |
| |
Open and Close (Open and Close a File) | |
| |
| |
Exfmt (Write Then Read Workstation Device) | |
| |
| |
Post (Post Device Specific Information) | |
| |
| |
Read (Read a Record from a File) | |
| |
| |
Readc (Read Next Changed Subfile Record) | |
| |
| |
Update (Update a Record) | |
| |
| |
Write (Write a Record) | |
| |
| |
| |
Alternate Syntax Options | |
| |
| |
Fixed-Format Calculation Specifications | |
| |
| |
Enhanced-Format Calculation Specifications | |
| |
| |
Free-Format Calculation Specifications | |
| |
| |
| |
Compiler Options | |
| |
| |
Compiler Choices for RPG IV Programs | |
| |
| |
The CRTBNDRPG Command | |
| |
| |
| |
Decimal Data Errors | |
| |
| |
Decimal Data Overview | |
| |
| |
Database File Models | |
| |
| |
Zoned Decimal Data | |
| |
| |
Packed Decimal Data | |
| |
| |
Conditions for Decimal Data Errors | |
| |
| |
| |
DDS Date and Time Format Considerations | |
| |
| |
Database Date and Time Overview | |
| |
| |
Database Date Format and Separator (Edit Character) | |
| |
| |
Database Time Format and Separator (Edit Character) | |
| |
| |
Special Dates and Times Values | |
| |
| |
| |
Source Code Listings | |
| |
| |
Zinclude Prototypes | |
| |
| |
Day of Week Ordinal | |
| |
| |
Day of Week Text | |
| |
| |
Return as Uppercase String | |
| |
| |
Convert to Uppercase | |
| |
| |
Return Length of Input String | |
| |
| |
In-Line ILE Procedures | |
| |
| |
Additional Source Listings | |
| |
| |
Index | |