INCLUDE | Teradata Vantage - INCLUDE - Advanced SQL Engine - Teradata Database

SQL Stored Procedures and Embedded SQL

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
xqq1557098602407.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1148
lifecycle
previous
Product Category
Teradata Vantage™

Purpose

Incorporates an external source file into the application program.

Invocation

Nonexecutable preprocessor declaration.

Embedded SQL only.

Syntax

INCLUDE include_file_name
include_file_name
The name of the source file to be included.
If text_name is SQLCA or SQLDA, a special case results: INCLUDE SQLCA and INCLUDE SQLDA are not instances of INCLUDE and are defined separately.

ANSI Compliance

INCLUDE is ANSI/ISO SQL:2011-compliant.

Authorization

None.

Rules for Using INCLUDE

  • Preprocessor2 searches the directory path for a file having the specified name and a language specific file extension:
    For this language … Preprocessor2 searches for this INCLUDE file type …
    C pc
    COBOL pb
    PL/I pi
  • The length of the INCLUDE filename can be up to 30 bytes.
  • The INCLUDE statement is effectively replaced by the included text in the application program input to Preprocessor2.
  • INCLUDE statements cannot be nested.

    Included text can contain any embedded SQL statements except another INCLUDE.

  • You can specify INCLUDE SQLCA and INCLUDE SQLDA statements in the included text.

Related Topics

For more information about INCLUDE SQLCA and INCLUDE SQLDA, see INCLUDE SQLCA and INCLUDE SQLDA.