By default, using the database specified by the DB compiler directive option, the DB2 ECM preprocessor automatically binds your program during the compilation process, creating and storing in your DB2 database a DB2 package required for successful execution.
However, depending on your environment, this straight-forward, default behavior might not match your requirements. For instance, you might want to create DBRMs (.bnd files) during compilation, and bind the DBRMs later using the DB2 LUW BIND command against your DB2 LUW databases. For this and other related scenarios, we provide several DBRM options.
We provide one option that enables you to specify an alternative name for the created DBRM file, and three options that enable you to redirect DBRM files to an alternative directory. If you specify more than one output option, the DB2 ECM uses the option that is determined to take precedence.
BIND also enables you to redirect the created DBRM file to an alternative directory. The default is the current directory unless you have also used one or both of the BINDDIR and HCOBND options. When you specify a path using BIND, it takes precedence over that specified by all other output options, if set.
You can set BIND on the command line. For details, see the BIND DB2 compiler directive option topic.
You can set BINDDIR on the command line. For details, see the BINDDIR DB2 compiler directive option topic.
Set the HCOBND environment variable to specify an alternative output directory for created DBRM files. This option has the lowest priority, and is used only when no alternative path is specified by either the BIND or the BINDDIR compiler directive options.