IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Question on PACKAGE/PLAN


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
balubhat

New User


Joined: 04 Oct 2005
Posts: 19
Location: Singapore

PostPosted: Mon Nov 09, 2009 11:50 am
Reply with quote

Hi All

I have a stand alone COBOL-DB2 program and I have many embedded SQL in the program. Due to some requirement I have to embed a new SQL for which the qualifier of the table is different than all other tables used in the program. i.e. all my existing SQLs refer to the table with qualifier as A001.<TABLE_NAME>. But now with my new SQL , I have to refer to a table with qualifier A002.
In the program we don't mention the qualifier but in the PACKAGE we give the qualifier.
Now my question is how can I compile and BIND this program for two different qualifier?
Pls help me.

Thanks.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Nov 09, 2009 6:33 pm
Reply with quote

suggest you create a new module.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Mon Nov 09, 2009 7:56 pm
Reply with quote

Try specifying the non-default qualifier explicitly when you reference the table - for example
Code:
SELECT *
  FROM A002.<table_name>
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Tue Nov 10, 2009 5:06 am
Reply with quote

Or create a view with select * under schema A001. on the base table A002 and use the view instead.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Nov 10, 2009 5:09 am
Reply with quote

deleted by dbz
Back to top
View user's profile Send private message
rahulcherekar

New User


Joined: 20 Feb 2007
Posts: 16
Location: New York

PostPosted: Sat Nov 14, 2009 2:43 am
Reply with quote

Creating synonym should solve your problem. If you do not have authority check with your DBAs.

Thanks,
Rahul.
Back to top
View user's profile Send private message
Anand Kumar

New User


Joined: 29 Aug 2007
Posts: 24
Location: chennai

PostPosted: Tue Nov 17, 2009 6:55 pm
Reply with quote

We had a couple of issues, similar to yours. We solved in creating a synonym. We should make sure the proper privilege is given to the user Read/Write/update
Back to top
View user's profile Send private message
sachin_star3
Warnings : 1

New User


Joined: 30 Sep 2006
Posts: 78
Location: pune

PostPosted: Thu Nov 19, 2009 12:50 am
Reply with quote

you can deal with your issue using following 2 ways.

1.create 2 different package with seperate hlq and bind in the single plan.

2.hard either any one table in hlq and put the other table hlq in the package bind
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Question for file manager IBM Tools 7
No new posts question for Pedro TSO/ISPF 2
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts panel creation question TSO/ISPF 12
No new posts Sort w/OUTREC Question DFSORT/ICETOOL 2
Search our Forums:

Back to Top