


A command file (primary file) may contain INCLUDE statements for further command files (secondary files). This helps to modularize blocks of statements and to clearly structure the command file.
The statement runs

The filename is passed to the operating system in exactly the same way it was entered by the user.
Up to five command files can be open at the same time; i.e., four nested INCLUDE statements are possible.
An INCLUDE statement opens and scans the specified command file before the next statement of the command file previously opened is executed.
For LOAD, an INCLUDE file is not a new command file in which statements such as RETURN and (SET) RETURNCODE have local effects. The statements are executed as if they were stored in the main command file. Therefore, INCLUDE is not a single statement and should be placed within a block enclosed by BEGIN and END to protect the control structure of the primary file. The optional specifications for code type and SQL mode, however, only refer to the INCLUDE file.


