in what environment are the programmers receiving the -805
an -805 simply means the db2 cat does not match the loadmodule invoked.
in cics environment this is common when the NEW COPY is overlooked.
in batch, when the worng loadlib is STEPed.
it can be due also to a bind failure. -
normally, after the linkedit you have a new load - the old has been deleted.
if the bind process does not complete, then the latest package/coll is actually for the last loadmodule created.
using collections will not solve your -805's.
only training of your rookie programmers will do that.
depending on db2 version, it has been suggested that everyone
migrate to using collections or packages, i don't remember which,
but the redbook lays it out,
and why. _________________ Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Joined: 09 Aug 2008 Posts: 1631 Location: Mumbai, India
Posted: Sat Feb 04, 2012 2:40 pm Post subject: Re: create a Collection
David Hunter wrote:
yes, I'm a DBA, thanks for asking. But I'm new to DB2. Majority of my experience is an Adabas admin. I've asked several DB2 admins about this but none have actually done this. Do you have any input?
I see. Short answer is - a collection is simply a way of grouping PACKAGEs into meaningful groups. You could use COLLECTIONs to separate programs for different application areas, e.g. payroll and inventory. Another use might be to have customized set of BIND parameters associated with different COLLECTIONs.
Saying only this much sounds as a half answer. Reading further might be interesting for you. This is from an old DB2 magazine, have modified it a bit where ever I felt I could:
The DB2 Pre-compiler splits the program into two parts: a COBOL and a DB2 part.
The embedded SQL is stripped out of the program and put into a partitioned data set (PDS) member, called a DBRM. Just as the COBOL part has to be compiled, the DBRM part has to go through BIND process to create the run-time executable code for the DB2 portion of the COBOL program. To help the COBOL and DB2 part to find each other later at run time, the precompiler engraves each with identical timestamps called consistency tokens.
You can BIND the DBRM into a PLAN (the old way), or you can BIND the instructions into a PACKAGE. A PLAN is an executable module containing the access path logic produced by the DB2 optimizer. The DBRMs of more than one program or PACKAGES can be bound into a PLAN.
A PACKAGE is a single, bound DBRM with optimized access paths. The DBRM of a single program is bound into a PACKAGE. To execute a PACKAGE, it should be included in the package list of a PLAN. PACKAGEs are not directly executed, they are only indirectly executed when the PLAN in which they are contained executes. So, the relationship between a DBRM and a PLAN is one-to-many, the relationship between a DBRM and a PACKAGE is always one-to-one.
As the number of DBRMs bound to a PLAN increases, binding the DBRM into a PLAN is not recommended. If we need to precompile and bind a new program or one of the programs changes and it is to be precompiled and bound again, all the programs (not just the modified/added program) will be rebound into the PLAN again. Then the BIND process could take hours to complete.
On the other hand, if a DBRM is bound to a PACKAGE and if the program is modified, only that PACKAGE would have to be rebound.
Said all that a term collections comes in, as I said in short answer -- a collection is simply a way of grouping PACKAGEs into meaningful groups. You could use COLLECTIONs to separate programs for different application areas, such as payroll and inventory. Another use might be to have customized set of BIND parameters associated with different COLLECTIONs. At run time, the load module starts up and eventually hits a paragraph containing a CALL to DB2. Then the COLLECTIONs named in the PLAN are searched for the PACKAGE with the same name and consistency token. If you don't find it anywhere in DB2, you get an -805 error.
If you're using the older technique of binding DBRMs directly into PLANs, then an unsuccessful search will result in an -818 error code.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum