Contents IndexIF statement INPUT statement

User's Guide
   Part VI. SQL Anywhere Reference
     Chapter 43. Watcom-SQL Statements
      INCLUDE statement

Function

Include a file into a source program to be scanned by the SQL source language preprocessor.

Syntax

     INCLUDE filename

Parameters

     filename:    identifier

Usage

Embedded SQL.

Permissions

None.

Side effects

None.

Description

The INCLUDE statement is very much like the C preprocessor #include directive. However, the SQL preprocessor will read the given file inserting its contents into the output C file. Thus, if an include file contains information that the SQL preprocessor requires, it should be included with the Embedded SQL INCLUDE statement.

Two file names are specially recognized: SQLCA and SQLDA. Any C program using Embedded SQL must contain an

     EXEC SQL INCLUDE SQLCA;

statement before any Embedded SQL statements. This statement must appear at a position in the C program where static variable declarations are allowed. Many Embedded SQL statements require variables (invisible to the programmer) which are declared by the SQL preprocessor at the position of the SQLCA include statement. The SQLDA file must be included if any SQLDA's are used.

Contents IndexIF statement INPUT statement