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
 

 

Question on PACKAGE/PLAN

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Question on PACKAGE/PLAN
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    Post subject:
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    Post subject:
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    Post subject: Reply to: Question on PACKAGE/PLAN
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    Post subject:
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    Post subject:
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    Post subject: Reply to: Question on PACKAGE/PLAN
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    Post subject:
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    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 Asynchronous CICS Processing Question moezbud CICS 0 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts Why myself doing Package Bind always ... Susanta DB2 5 Thu Mar 02, 2017 10:47 pm
No new posts Bind plan as a member to another bind... rexx77 DB2 0 Thu Feb 16, 2017 2:02 am
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm


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