MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Accessing tables with same structure but different creator

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 317
Topics: 50
Location: Germany

PostPosted: Thu Jan 14, 2010 7:25 am    Post subject: Accessing tables with same structure but different creator Reply with quote

Hi all,

i have diffrent tables like

CustomerA.Table1
CustomerB.Table1
CustomerC.Table1


Table1 is identical (regarding columns) for all Cutomers, each Customer has it's own table. The Creator of the table equals the customer.

I have one program XYZ to access CustomerA.Table1.

Now i like to access CustomerB.Table1 using same program XYZ.

Are there any (bind, runtime ???) options, to set in program XYZ, which table is accessed ? Seems like like a dynamic change of the creator of the table? Possible or not?

How to handle the packages? I think, i need one package for each creator ?

Any commenst pls ?


Regards,
bauer
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Jan 14, 2010 7:51 am    Post subject: Reply with quote

Bauer,

depends (I know, you don't want to hear this garbage)
on your site standards.

I have worked in different scenarios
  • the bind process parms no QUALIFIER/SCHEMA and a module is called and depending on the customer, this module SETs PACKAGESET I think (someone else will come along and mention it, unless you find it in the db2 manual under SET
  • different databases are set up for each customer, and again, a higher level module determines which set of modules to call to process the customer - each set of modules is at BIND time QUALIFIED/identified with a schema - means limited number of customers - each module is cloned and renamed (slightly) to differentiate the customer - same code, just different name

you really need to get your dba involved in this, unless you are the dba then I suggest you either hit the dba forums or I can give you the email address of a german dba who can tell you - if he is still working.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Jan 14, 2010 7:57 am    Post subject: Reply with quote

kolusu will probably know and he should be back this week.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Jan 14, 2010 8:00 am    Post subject: Reply with quote

Here is the link to SET CURRENT PACKAGESET:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNSQH11/5.98?DT=20010718164132

again, I reiterate - this needs to be a site imposed standard, otherwise with everybody trying their own way, y'all will get into a world of hurt - but then again I need the contract work.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Jan 14, 2010 8:17 am    Post subject: Reply with quote

Bauer,

This kind of thing is controlled one way or another at every multi-customer site in germany - due to the law - each customer must have his own database.

the more I think about it, someone at your site is screwing with you.
This can not be something new,
(unless - and I will eat my words if so - your firm has just suddenly migrated to multi-customer)
and as a result, there is a methodology in place.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 317
Topics: 50
Location: Germany

PostPosted: Thu Jan 14, 2010 3:24 pm    Post subject: Reply with quote

Hi dbzTHEdinosauer,

thank you for your answer. The remark about bind parameter QUALIFIER/SCHEMA helps.

Pls see the PM I send to you.

regards,
bauer
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Thu Jan 14, 2010 6:56 pm    Post subject: Reply with quote

If your PM contains your solution, please share for the benefit of others.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Jan 14, 2010 9:47 pm    Post subject: Reply with quote

Terry,
He was just reiterating his question and understanding of the info I gave him in my post,
in german - his first language - which gives him the feeling of security to articulate.

I am sending him on to a german DBA I know, and I know - knows the answer.

knowing Bauer, he will post back here with the implementation details, as I don't know the answer to his basic question.

by the way, looks like a potential battle with Jack over code-tags.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Thu Jan 14, 2010 11:46 pm    Post subject: Reply with quote

Appreciate the clarification. The only reason I mentioned it was that I get tired of people soliciting help from people who volunteer their time and expertise, then hoard the knowledge they've benefited from.
Concerning Jack, I didn't realize a simple request (and I even preceded it with "please") would result in the reaction it got. Oh well. Silly me for trying to encourage people to make their posts more readable and understandable. Rolling Eyes Smile
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 317
Topics: 50
Location: Germany

PostPosted: Fri Jan 15, 2010 3:32 am    Post subject: Reply with quote

Hi Terry_Heinze,

sorry for the confusion.

Absolute my opinion, what solutions should not be communicated with pm's. Pls donn't worry, I donn't do this, see post http://www.mvsforums.com/helpboards/viewtopic.php?t=7313&highlight=, the two messages at the end. Here I gave after years (!!!!!) additional information and after some month, this means today, i could remember, that this post is a good sample for my practice here in the forum.

bauer
Back to top
View user's profile Send private message
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 317
Topics: 50
Location: Germany

PostPosted: Fri Jan 15, 2010 3:42 am    Post subject: Reply with quote

Hi,

after reading a little bit documentation, but without testting at the moment (no time yet to prepare a sample in our envirnment), my opinion is:

a) Remove all Creators in the select / update statements in the source code
b) precompile and compile the source (same source for all customers, same object code for all customers, do this step once)
c) Create DBRM (without creator).
d) Bind Package using the DBRM with specifying the table creator. Do this step for each customer.
e) Before executing the object (load) module, determine the customer, and use PACKAGESET Command to access the appropriate package for the customer.

The you dhz for the essential hints.

regards,
bauer
Back to top
View user's profile Send private message
mohantarte
Beginner


Joined: 25 Jan 2010
Posts: 1
Topics: 0
Location: Pune, maharashtra

PostPosted: Thu Jan 28, 2010 12:13 pm    Post subject: Reply with quote

Hi,

I am a application programmer. I have seen programs where the tables with different creators are accessed. In such a case instead of using the direct table the Alias/view( either one of them) was used which was created for the two tables with some common qualifier.

e.g

A.Table1 : This is the first table
B.Table2 : This is the second table

We had Alias/view(either one of them) on these two tables with creator as "C".

I hope this will help.

Mohan
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group