The declarations generator (DCLGEN) produces an SQL DECLARE TABLE statement and a COBOL, PL/I, or C data declaration for a table or a view named in the catalog. Environment for DCLGEN The declarations generator is executed by the DSN subcommand DCLGEN. That subcommand can be issued from a...
You need to access DB2 catalog tables (aka SYSIBM), and get all the definitions of columns in the table. Then you need to use the fine manual that describes how to convert DB2 formats into COBOL formats, and generate the DCLGEN.