Problem:
When compiling a DB2 application using Net Express the DB2(BIND) directive is used to create a DB2 Bind file that can be used to bind the application to the database.
But when using the DB2 BIND command as follows the error shown is displayed.
Why?
SQL>db2 bind @dynamic.bnd
LINE MESSAGES FOR dynamic.bnd
------ --------------------------------------------------------------------
SQL0061W The binder is in progress.
SQL0031C File "BINDV810L ` ü « O
œ " could not be opened.
LINE MESSAGES FOR dynamic.bnd
------ --------------------------------------------------------------------
SQL0040N An error occurred on one or more bind files in list
"dynamic.bnd". The following files were not bound: "1".
SQLSTATE=00000
SQL0082C An error has occurred which has terminated
processing.
SQL0091N Binding was ended with "3" errors and "0" warnings.
Resolution:
The problem was caused by the inclusion of the @ character at the beginning of the bind file name.
SQL>db2 bind to @dynamic.bnd
When this character is used to start the name then it is supposed to be referencing a list file which is a text file containing all the names of the various .bnd files to use.
If you have a single bnd file, e.g. "dynamic.bnd" then you need to specify the name without the @ character:
SQL>db2 bind to dynamic.bnd
Only use the @ character when specifying a list:
SQL>db2 bind to @dynamic.lst



