Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to bind a table in a different collid

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ravindra.vadali

New User


Joined: 30 Jan 2012
Posts: 34
Location: USA

PostPosted: Tue Jan 22, 2013 8:09 pm    Post subject: how to bind a table in a different collid
Reply with quote

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
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Tue Jan 22, 2013 8:32 pm    Post subject:
Reply with quote

Is COLLID you mean here is a collection id or qualifier?
Back to top
View user's profile Send private message
ravindra.vadali

New User


Joined: 30 Jan 2012
Posts: 34
Location: USA

PostPosted: Tue Jan 22, 2013 8:46 pm    Post subject:
Reply with quote

I am sorry I need to rephrase my question...
Its qualifier!!
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Tue Jan 22, 2013 9:23 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ravindra.vadali

New User


Joined: 30 Jan 2012
Posts: 34
Location: USA

PostPosted: Tue Jan 22, 2013 9:29 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Tue Jan 22, 2013 11:11 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ravindra.vadali

New User


Joined: 30 Jan 2012
Posts: 34
Location: USA

PostPosted: Wed Jan 23, 2013 12:00 am    Post subject:
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Wed Jan 23, 2013 1:13 am    Post subject:
Reply with quote

Quote:
I am sorry I need to rephrase my question...
Its qualifier!!


Quote:
COLLID(QUALIFIER)
<<< I think you reffered to this one. icon_smile.gif

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
View user's profile Send private message
ravindra.vadali

New User


Joined: 30 Jan 2012
Posts: 34
Location: USA

PostPosted: Wed Jan 23, 2013 1:19 am    Post subject:
Reply with quote

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
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Wed Jan 23, 2013 1:55 am    Post subject:
Reply with quote

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
View user's profile Send private message
ravindra.vadali

New User


Joined: 30 Jan 2012
Posts: 34
Location: USA

PostPosted: Wed Jan 23, 2013 2:05 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm
No new posts Updating online Db2 table kishpra DB2 3 Fri Aug 12, 2016 2:44 pm
No new posts Getting soc4 on internal table in cobol abdulrafi COBOL Programming 13 Fri May 06, 2016 3:39 pm
No new posts Difference space showed for TS and it... autobox DB2 1 Thu Apr 14, 2016 1:07 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us