DB2 Tips as on 10/05/2012

IBM's flagship relational database management system

DB2 Tips as on 10/05/2012

Postby Swapnilkumar » Fri Oct 05, 2012 11:34 am

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.
- Swapnilkumar.
Posts: 12
Joined: Tue Aug 07, 2012 10:05 pm
Location: Pune, India
Has thanked: 0 time
Been thanked: 0 time

Re: DB2 Tips as on 10/05/2012

Postby BillyBoyo » Fri Oct 05, 2012 1:27 pm


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.
Global moderator
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Return to DB2