I hope I can explain this well enough so everyone can understand.
We have a client/system that used VB6 and Cobol/DL/1. Recently, we had to convert the VB6 code to .net. At the same time, it was important that any errors in the .net code didn't screw up the "real" DL/1 test database. What we did was to create copies of the database and then change the PSB with it's PCB's and AIB names so that the code could "choose" to which database it should write based on variations of the client userid. All well and good.
Now we're going to convert from DL/1 to DB2 and I'm wondering if there is some "simple" method of being able to switch between DB2 databases ? I'm not sure if it's standard, but at work, all our cobol/DB2 code is written along the lines of
Code:
select etc etc
from K46A01AA
where K46A01AA is an alias for the real table name.
Theoretically, we could have copies of K46A0100 such as K46B0100, but I envisage problems along the following lines. Someone is testing and their results show no rows. They look in K46A0100 and there's at least one there. Trouble is, their package is bound against K46B0100 which doesn'thave any rows.
You can see the problems that can arise.
So - is there any method for switching between DB2 tables in a simple manner that anyone can suggest ?
If you are relative new to DB2, look at the concept of packages and collections. What you want to achieve, switching between test databases, is done best with binding the dbrms into multiple collections, while one collection uses one table creator-id.
If you now create different plans, each using one of the collections, you switch between your test databases by using different plans during the start of your application.
This concept is very powerful, but you need some reading to feel comfortable with it.
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