Dclgen Utility--Generate Structure
The dclgen utility (declaration generator utility) is a structure‑generating utility that maps the columns of a database table into a structure that can be included in a variable declaration.
The dclgen utility can be invoked from the operating system level by executing the following command:
DCLGEN language dbname tablename filename structurename [-n] [-q]
language
Defines the embedded SQL host language.
dbname
Defines the name of the database containing the table.
tablename
Defines the name of the database table.
filename
Defines the output file generated by dclgen containing the structure declaration.
structurename
Defines the name of the generated host language structure.
-n
Does not print the DECLARE TABLE statement.
-q
Creates output in QUEL format.
This command creates the declaration file,
filename, containing a structure corresponding to the database table. The file also includes a DECLARE TABLE statement that serves as a comment and identifies the database table and columns from which the structure was generated. Once the file has been generated, use an embedded SQL INCLUDE statement to incorporate it into the variable declaration section. For details, see
DECLARE TABLE on page 619.
For details on the dclgen utility, see the Embedded SQL Companion Guide or the Command Reference Guide.
Last modified date: 04/03/2024