Page 1 of 1

DB2 Tips as on 10/05/2012

PostPosted: Fri Oct 05, 2012 11:34 am
by Swapnilkumar
This topic is for sharing some info,
    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.

Re: DB2 Tips as on 10/05/2012

PostPosted: Fri Oct 05, 2012 1:27 pm
by BillyBoyo
Swapnilkumar,

How, if nobody says "this is wonderful, thanks for the effort" or "this is rubbish, please ignore" is anyone going to get any idea whether your post is any use?

I'd hope your DB2 is better than your Sort. Your previous posts included reading a file 42 times, which only needed to be read once, remember.