mfhco and cobmfhco dclgen commands

Syntax

Windows:

mfhco dclgen db=databasename lang=language tbl=schemaname.tablename 
  file=copybookname [pre={USER | TBL | NO}] [user=username] [fld={COL | NUM}]
     null=nullindname [typeint={COMP | COMP5}] [typelob={LOCATOR | LOB | FILE}] 
        [declare={Y | N }] [str=structurename]

UNIX:

cobmfhco dclgen db=databasename lang=language tbl=schemaname.tablename 
  file=copybookname [pre={USER | TBL | NO}] [user=username] [fld={COL | NUM}]
     null=nullindname [typeint={COMP | COMP5}] [typelob={LOCATOR | LOB | FILE}] 
        [declare={Y | N }] [str=structurename]

Syntax Rules

  1. At least one space must occur before each parameter in the command.
  2. There must be an equal sign (=) between parameters and their values.
  3. If you omit parameters that have a default value, Host Compatibility Option uses the default value.

Parameters

databasename Name of the target database.
language Language to generate. cbl is the default; can also specify c or pli.
schemaname Schema name for the generated copybook.
tablename Table name for the generated copybook.
filename Name of the copybook file to generate.
TBL Specifies that the copybook prefix is the same as the table name. Default.
USER Specifies that the prefix is supplied by the user.
NO Specifies that there is no prefix.
username A text string composed of valid COBOL characters, used as a prefix for each host variable in the copybook.
COL Specifies the column name. Default.
NUM Specifies the column number.
nullindname Specifies the null indicator name suffix. Default is NULL.
COMP Specifies generation of numeric fields as COMP variables. Default.
COMP5 Specifies generation of numeric fields as COMP-5 variables.
LOCATOR Specifies generation of LOB variables as SQL TYPE LOB-LOCATOR. Default.
LOB Specifies generation of LOB variables as SQL TYPE LOB(size).
FILE Specifies generation of LOB variables as SQL TYPE LOB-FILE.
declare Y - Generate DECLARE TABLE as part of the copybook. Default.

N - Do not generate DECLARE TABLE as part of the copybook.

structurename Specifies the name of the copybook structure.

Examples

Windows:

mfhco dclgen db=db2demo lang=cbl tbl=demo.items file=item.cpy

UNIX:

cobmfhco dclgen db=db2demo lang=cbl tbl=demo.items file=item.cpy