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
 

 

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 Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Getting list of tables defined under ... kishpra DB2 2 Wed Aug 24, 2016 10:36 am
No new posts ISPF Tables Creation newsysprg TSO/ISPF 6 Wed Jul 13, 2016 2:21 pm
No new posts Geneartion of COBOL copybook structre... murugan_mf COBOL Programming 3 Fri May 20, 2016 12:48 pm
No new posts New DB2 tables creation kishpra DB2 3 Tue Feb 02, 2016 7:00 pm


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