- 1) Whenever you define the host variable in your program(the one without DCLGEN) ,define it at '01' or '77' Level.If you define it at any sub-level (05,10 etc), you will get the error at run time as "Undefined or Unusable Host Variable", even though you have spelled,defined and used the host variable correctly in your program. If you have multiple host variables,define all of them at '01' or '77' Level.
2) The difference in -805 and -818 is, if you bind a DBRM to Package and then bind that Package to Plan and consistency token doesn't match then you get -805 where as if you bind DBRM directly to Plan ( without Packaging) and then consistency token doesn't match, you get -818
3) Sql code -911 is for a lock timeout and occurs only when trying to access data that is locked by another process. Sql code -904 is for resource unavailable, and can be caused by any number of resources that are not available. The -904 will have an associated reason code and type code.
Edited to remove unreasonable demand that replies are not allowed.