View previous topic :: View next topic
|
Author |
Message |
ravindra.vadali
New User
Joined: 30 Jan 2012 Posts: 34 Location: USA
|
|
|
|
Hi All,
Good morning. I know I will get severe beatings from you for asking this trivial question. I searched the site but was not very sure I found the answer so posting this query
I have a table called TABLEA which is in collid called COLLIDA
and then I have program called PRGMB which has references to tables
TABLE B, TABLE C and TABLE D which are all in another collid called COLLIDB and also has a reference to the TABLEA in COLLIDA
Now, when I am binding this with COLLID (QUALIFIER) as COLLIDB, I am getting a bind error, as the bind is not able to find TABLEA in COLLIDB.
Could you please let me know if there is way to bind tables in two different COLLID using the same BIND?
Thanks a many for the help in advance |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Is COLLID you mean here is a collection id or qualifier? |
|
Back to top |
|
|
ravindra.vadali
New User
Joined: 30 Jan 2012 Posts: 34 Location: USA
|
|
|
|
I am sorry I need to rephrase my question...
Its qualifier!! |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
It depends on your site-standards :
you can hardcode the qualifier for one of the tables in the program
i.e. "select * from tableA, QualB.TableB " and then bind with QualA.
Another way is to define an alias :
CREATE ALIAS QualA.QBTableB for QualB.TableB
select * from tableA, QBTableB |
|
Back to top |
|
|
ravindra.vadali
New User
Joined: 30 Jan 2012 Posts: 34 Location: USA
|
|
|
|
Thanks GuyC,
I will run the bind with the first option that you have specified and will share my results.
If that fails, then I have to turn back to my DBAs to create the alias for all the necessary collections.
Thanks,
Ravi |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
As per me COLLID is associated with your package name. And all the packages consists of COBOL-DB2 programs.
Quote: |
I have a table called TABLEA which is in collid called COLLIDA |
This is something not very true, as tables are not dependent on your COLLID. |
|
Back to top |
|
|
ravindra.vadali
New User
Joined: 30 Jan 2012 Posts: 34 Location: USA
|
|
|
|
Yes Rohit, I agree!! I think in my second note I stated that its not a collection ID but it is a qualifier. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Quote: |
I am sorry I need to rephrase my question...
Its qualifier!! |
<<< I think you reffered to this one.
Code: |
BIND PACKAGE (ABCDEV1) -
MEMBER (ABCBD555) -
ACTION (REPLACE) -
OWNER (X@ABCT1) -
QUALIFIER (DBTEST) -
CURRENTDATA (YES) -
RELEASE(DEALLOCATE) -
VALIDATE (BIND) -
EXPLAIN (NO) |
looking to above card,
I have not seen you reffered to "QUALIFIER", hence I thought to make it clear, as in all your post you have mentioned collection ID.
But GuyC has provided you the options and should work, but generally DBA's creates tables for whatever schema's/qualifier you need and this is needed just to make your own testing and not to play with someone else data in the same table.
All the best. |
|
Back to top |
|
|
ravindra.vadali
New User
Joined: 30 Jan 2012 Posts: 34 Location: USA
|
|
|
|
Hi Rohit,
Sorry to confuse you, may be I was lost in the third world!!
I truly agree with you that its
QUALIFIER (DBTEST) -
that I was mentioning. And as GuyC suggested I am hardcoding the qualifier in the source code and will then bind the program. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Just make sure that the hard coded qualifier exists in all DB2 Subsystems that you will ever Bind to.
It may work in Test Subsystem, but not in Quality or Production Subsystems. |
|
Back to top |
|
|
ravindra.vadali
New User
Joined: 30 Jan 2012 Posts: 34 Location: USA
|
|
|
|
Yes, that qualifier exists in the same DB2 subsystem as the others. And in the prod, the table exists under the same qualifier.
Thanks,
Ravi |
|
Back to top |
|
|
|