Previous Topic: DISPLAY/PUNCH OPTIONS StatementNext Topic: COMMIT Statement


INCLUDE Statement

The INCLUDE statement temporarily suspends input to the batch or online DDDL compiler and retrieves, as input to the compiler, source statements associated with an existing IDD module. Modules are defined in the dictionary using the MODULE statement (see MODULE (PROCESS/QFILE/TABLE)). The module source can contain any number of DDDL statements.

When all the module source has been included, the DDDL compiler continues processing with the source statement immediately following the INCLUDE statement.

Syntax

INCLUDE Statement

►►─── INCLUDe MODule module-name ──┬───────────────────────────────────┬──────►
                                   └─ Version is ─┬─ version-number ─┬─┘
                                                  ├─ HIGhest ────────┤
                                                  └─ LOWest ─────────┘

 ►─┬─────────────────────────┬────────────────────────────────────────────────►
   └─ LANguage is language ──┘

 ►─┬───────────────────────────────────────────────────┬──────────────────────►◄
   └─ PREpared by user-id ─┬─────────────────────────┬─┘
                           └─ PASsword is password ──┘

Parameters

INCLUDe MODule module-name

Specifies that the DDDL compiler is to include in the current input file the source statements associated with the named module. Module-name must be the name of an existing IDD module.

Version is

Qualifies nonunique module names.

version-number

Specifies a specific version number for the module.

HIGhest

Specifies that the DDDL compiler is to use the highest version number associated with the specified module.

LOWest

Specifies that the DDDL compiler is to use the lowest version number associated with the specified module.

LANguage is language-name

Qualifies the module name by language. This parameter is required if the module has been defined with a language in the dictionary.

PREpared by user-name

Specifies the name of the user requesting the INCLUDE operation. For a detailed description of the PREPARED BY clause, see Securing the Dictionary.

PASsword is password

Specifies the password of the user requesting the INCLUDE operation.

Usage

Restrictions on INCLUDE

The following restrictions apply to the INCLUDE statement:

If the module source being included contains a SIGNON statement to another dictionary, the DDDL compiler terminates the INCLUDE operation and continues processing with the statement immediately following the INCLUDE.

Example

The following example shows a DDDL compiler session in which the user includes source statements associated with the module INCLUDE-TEST version 1 in the current DDDL input file. The definition of the module INCLUDE-TEST is shown.

add module include-test version 1
   prepared by wmc
   module source follows
      display all modules where name contains '-wmc'.
      signon dict=b
      modify user wmc.
      ...
   msend.

The sample session follows:

signon dict=a
include module include-test version 1.
display file xyz version 2.
 .
 .
 .
signoff

Because module INCLUDE-TEST contains a SIGNON statement, the DDDL compiler terminates the INCLUDE operation without executing the MODIFY USER WMC statement; processing continues with the DISPLAY FILE XYZ statement.