In PRO/5, the so-called "program chaining" feature is referred to as "program overlaying." The concepts are similar. A program segment may pass control to another program segment by means of a RUN statement:
1000 RUN "nextprogram"
The new program is loaded into the workspace (i.e., replacing the old program) and begins executing. Unlike the earlier chaining feature, all variables are automatically passed intact to the overlaying program. This eliminates the need for the programmer to specify "common" lists. The names of the variables remain the same from one overlay to the next. For example, the variable X in one overlay is the same X in another overlay.
In order to eliminate the excess accumulation of data in the workspace, each application should initialize the data area with a BEGIN or CLEAR statement. If the old style of chaining is desired this may be simulated with the "CLEAR EXCEPT" command.