Coding Standards for Database Files › Coding Standards for RPG III Programs
Coding Standards for RPG III Programs
This section describes coding standards for RPG III programs. For more information, refer to the appendix, "Programming and Coding Examples".
These guidelines focus on designing programs that are easy to follow. The discussion is grouped under the following headings:
- Program layout—Basic conventions for documentation and spacing.
- Coding structures—For historical reasons RPG III permits you to code many different ways (for instance with or without the cycle, using indicators or IF statements). Some of the ways should be avoided.
- Naming standards—Conventions for naming variables, formats, fields, arrays, and indicators in a consistent manner.
- Techniques—Date handling, job information, file information, and calculation checks.