Question: how dclgen is created in db2?
Answer: DCLGEN also generates corresponding host variable structures. DCLGEN generates a table or view declaration and puts it into a member of a partitioned data set that you can include in your program. When you use DCLGEN to generate a table declaration, Db2 gets the relevant information from the Db2 catalog.