Including declarations from DCLGEN in your program
After you use DCLGEN to produce declarations for tables, views, and variables for your C, COBOL, or PL/I program, you should include these declarations in your program.
Before you begin
Recommendation: To ensure that
your program uses a current description of the table, use DCLGEN to
generate the table's declaration and store it as a member in a library
(usually a partitioned data set) just before you precompile the program.
Procedure
To include declarations from DCLGEN in your program:
Code the following SQL INCLUDE statement in your program:
EXEC SQL
INCLUDE member-name
END-EXEC.
member-name is the name of the data set member where the DCLGEN output is stored.
Example
EXEC SQL
INCLUDE DECEMP
END-EXEC.