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 Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Identify top 30 big tables or indexes... ashek15 DB2 0 Fri Jun 16, 2017 10:01 am
No new posts Accessing first bit of PD value rajatbagga DFSORT/ICETOOL 11 Wed May 03, 2017 6:03 am
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am

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