%INCLUDE statement


A %INCLUDE statement logically copies another file into the fields definitions or parameters at the point of the %INCLUDE statement. %INCLUDE statements might be used in the BMC AMI Datastream parameter file, in the Fields Definitions files, and in CZAJOBLG parameter files.

INCLUDE.png

For more information about for and/or if, see FOR-and-IF-statements.

%INCLUDE statements might be nested to a depth of 25; that is, a file referenced on an %INCLUDE statement might contain %INCLUDE statements, and the files referenced by those %INCLUDE statements might contain one or more %INCLUDE statements, and so forth to a depth of 25. Be careful to avoid circular %INCLUDEs. A circular %INCLUDE happens,

Example

If you code %INCLUDE A, and member A contains the statement %INCLUDE B, and member B contains the statement %INCLUDE A.

An %INCLUDE statement is similar to a COBOL COPY statement, a PL/I %INCLUDE statement, or a C preprocessor #include statement. For instance, if your parameter file contained

OPTIONS FORMAT(ALL)
%INCLUDE MYSERVER
SMF 80 ...

and the member MYSERVER consisted of

SERVER 192.168.1.1

Then the effect would be the same as if your parameter file were,

OPTIONS FORMAT(ALL)
SERVER 192.168.1.1
SMF 80 ...

The following three special rules apply to %INCLUDE statements:

  • %INCLUDE must appear physically first on the line; it might not be preceded by a comment (although it might be preceded by one or more blanks).
  • %INCLUDE statements might not be continued; they must appear entirely on a single line of the file.
  • %INCLUDE statements might be embedded in a continued statement. For instance, the following is valid,

SMF 80 FIELDS(      +
%INCLUDE SECURITY
              )

assuming that member SECURITY contained a valid list of SMF Type 80 fields, including appropriate continuation indicators, for instance,

SMF80EVTQ SMF80CAT SMF80DESD   +
SMF80USR  SMF80GRP   +

%INCLUDE

Must be coded exactly as shown. It must appear physically first on the line; it might not be preceded by a comment (although it might be preceded by one or more blanks).

For and/or if

See FOR-and-IF-statements.

Dataset Specification

Specifies the member or file to be included. As the included member or file is an input data set, a specification of * (SYSOUT) is not valid, and the output variable symbols are not supported. The default PDS is DD:CZAPARMS; that is, the data set named on the CZAPARMS DD statement.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*