Previous Topic: RPG III Field Names

Next Topic: Label Naming Convention

RPG III Subroutine and Label Names

Given that RPG III source code is edited on-line using a small (24 x 80) panel, it is important to make an effective use of subroutine and label names. The subroutine and label naming conventions for RPG III described below are intended to do two things:

  1. Help distinguish between the major and minor sections of the code.
  2. Indicate whether you need to scroll forwards or backwards to find a section of code.

Subroutine names and label names should take the following forms:

Hierarchy prefix—‘XX’ is a hierarchy level prefix, which is the same for all labels in a given subroutine, and is:

Subroutine mnemonic—MMMM is a mnemonic describing the subroutine:

The following are reserved standard subroutine mnemonics: