Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Accessing 2 tables from 2 different schema

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

New User


Joined: 23 Sep 2006
Posts: 12
Location: Pune

PostPosted: Thu Apr 05, 2007 10:16 am    Post subject: Accessing 2 tables from 2 different schema
Reply with quote

Generally when we write the SQL query in COBOL program we do not prefix the qualifier (owner) name along with the table name. If we have to access 2 tables which belong to 2 differnet owners then how to specify that and where?
Back to top
View user's profile Send private message

senthilssg

New User


Joined: 09 Dec 2005
Posts: 64
Location: USA

PostPosted: Thu Apr 05, 2007 10:51 am    Post subject:
Reply with quote

Hi ,

If you want access the two tables with different schema in your query then you will have to explicitly specify the schema name for table in query itself .

Code:

select * from schema1.table1 where col1 in ( select col1 from schema2.table2 ) ;



Regards
Senthil
Back to top
View user's profile Send private message
Shobana Bhaskar

New User


Joined: 02 Mar 2007
Posts: 35
Location: Pennsylvania, US

PostPosted: Mon Apr 09, 2007 2:02 pm    Post subject:
Reply with quote

Hi,

In Cobol program, we cannot specify qualifier. Instead you should bind your program to the appropriate plan. You will have package collections that belongs to different regions. You should make use of the plan name for respective region while executing the program (through JCL - DSNPARM).
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 VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts To get Non matching row after compari... vinu78 DB2 7 Fri Jan 05, 2018 5:43 pm
No new posts DB2 catalog tables Pavan kumar chauhan DB2 8 Thu Dec 21, 2017 6:32 pm
No new posts Selecting a row from multiple tables! Vignesh Sid DB2 2 Thu Oct 26, 2017 6:09 pm
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us