Natural for OpenVMS Version 6.3.12 for OpenVMS
 —  Programming Guide  —

Multiple Use of Source Code - Copycode

This document describes the advantages and the use of copycode.

The following topics are covered:


Use of Copycode

Copycode is a portion of source code which can be included in another object via an INCLUDE statement.

So, if you have a statement block which is to appear in identical form in several objects, you may use copycode instead of coding the statement block several times. This reduces the coding effort and also ensures that the blocks are really identical.

Top of page

Processing of Copycode

The copycode is included at compilation; that is, the source-code lines from the copycode are not physically inserted into the object that contains the INCLUDE statement, but they will be included in the compilation process and are thus part of the resulting object module.

Consequently, when you modify the source code of copycode, you also have to newly compile (STOW) all objects which use that copycode.

Attention:

For further information, refer to the description of the INCLUDE statement (in the Statements documentation).

Top of page