INCLUDE Command

The ++INCLUDE command is stored in the library as an embedded statement within a library member. During retrieval of a library member to a work output file, a ++INCLUDE causes the member name specified by the ++INCLUDE to be located, and then retrieved from the library, and written to the output file in place of the ++INCLUDE. Statements in the originally-retrieved member following the INCLUDE continue to be retrieved to the output file as normal. You can specify expanded retrieval to a punch output file as an installation option.
capan146
The ++INCLUDE command is stored in the
Panvalet
library as an embedded statement within a library member. During retrieval of a library member to a work output file, a ++INCLUDE causes the member name specified by the ++INCLUDE to be located, and then retrieved from the
Panvalet
library, and written to the output file in place of the ++INCLUDE. Statements in the originally-retrieved member following the INCLUDE continue to be retrieved to the output file as normal. You can specify expanded retrieval to a punch output file as an installation option.
The logical record length of all ++INCLUDEd members must match the logical record length of the member in which the ++INCLUDE statement resides (the ROOT member); otherwise, a diagnostic ERROR message is issued.
The ++INCLUDE command must begin in position eight of the input record. This is the only command in the
Panvalet
system that does not begin in position one. At least one blank must follow the command.
Syntax
++INCLUDE name
Parameters
  • name
    The name is a required parameter and must be a valid member name of 1 to 10 alphanumeric characters (A through Z, 0 through 9, or special characters #, $, @). It can appear anywhere in positions 18 through 72, inclusive, in the input record.
    If the specified name is invalid or not found in the library, the ++INCLUDE command itself is output and assumed not to be a valid command. The member you ++INCLUDE can be of any format.
Operation
Depending on the ++INCLUDE nest level chosen at system installation, ++INCLUDE commands issued by ++INCLUDEd members are replaced up to the selected nest level. ++INCLUDE commands within embedded ++INCLUDEs beyond this level are output, but not expanded. A nest error message appears on the print file. All ++INCLUDE commands encountered during retrieval to the work file appear on the library input listing.
The nest levels (six is the innermost level, one is the outermost level) are reported to the right of the normal ++INCLUDE messages on the PAN#1 print file. ++INCLUDEs are reported in the order that expansion is completed; therefore, the innermost is reported first because it is completed first.
The ++INCLUDE command is similar only in concept to the COBOL language COPY/INCLUDE functions; all restrictions are removed. You can use ++INCLUDE in any library member of any format, in any relative position within the member. A member can contain any number of ++INCLUDE commands. If a member containing ++INCLUDE commands is in PRODuction status, all members included must also be in PRODuction status. However, members in TEST status can ++INCLUDE either PRODuction or TEST members.
All comment records generated for ++INCLUDEd members include the level number of the ++INCLUDEd member.