Chapter 3. Procedures and the Program Logic Cycle

A procedure is a collection of statements that can be called and run.

There are three kinds of procedures in RPG: regular subprocedures, linear-main procedures and cycle-main procedures. RPG source programs can be compiled into one of three kinds of modules depending on the types of procedures present, and as indicated by the presence of the NOMAIN or MAIN keyword on the Control specification: Cycle, Nomain, or Linear-main modules.

The term "subprocedure" is used to denote both regular subprocedures and linear-main procedures.

An RPG source program can be divided into these sections which contain procedures:



[ Top of Page | Previous Page | Next Page | Contents | Index ]