Skip to main content

Problem:

Is there an easy way to determine the proper cobol mapping (declaration) to use for an XDB decimal (5,0) column?

Resolution:

To determine the correct cobol mapping for any XDB data type use the DCLGEN utility.

From the Tools menu, select SQL FOR DB2 and then DCLGEN.

Click the HELP button on the dialog box for assitance in filling out the form.

This utility generates a complete SQL DECLARE statement and the appropriate record definition. For cobol the generation is a copybook that can be included in a cobol program to define the appropriate host variable declarations for the corresponding columns in the specified table.

Employing this mechanism it was determined the correct cobol mapping for a decimal(5,0) was

S9(5)V COMP-3.

Old KB# 5124

#EnterpriseDeveloper
#MFDS