2. Using Ingres Commands : dclgen Command--Generate Structure Declarations
 
Share this page                  
dclgen Command--Generate Structure Declarations
The dclgen command generates a structure declaration file from table descriptions. The file contains a structure corresponding to the database table, and a declare table statement that serves as a comment and identifies the database table and columns from which the structure was generated.
When the file is generated, use an embedded SQL include statement to incorporate it into the variable declaration section. See the example that follows.
The dclgen command has the following format:
dclgen [language] [dbname] [tablename] [filename] [structurename]
language
Specifies the embedded SQL host language, such as C.
dbname
Specifies the name of the database containing the table.
tablename
Specifies the name of the database table.
filename
Specifies the name of the output file into which the structure declaration is placed.
structurename
Specifies the name of the host language structure that the command generates. The structure tag is the structure name followed by an underscore character (_).