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

Difference between Qualifier and Owner


IBM Mainframe Forums -> DB2
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
hariibm

New User


Joined: 05 Feb 2007
Posts: 61
Location: Chennai

PostPosted: Thu Mar 25, 2010 11:06 am
Reply with quote

Hi,

Please let me know the difference between the two parameters QUALIFIER and OWNER which we give while binding a DB2 program.

Regards,
Hari.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Mar 25, 2010 11:47 am
Reply with quote

Hello Hari,

Owner : Determines the authorization ID or the owner of the object (plan or package)

Qualifier :Determines the implicit qualifier for unqualified names of objects in the plan or package

From FM
Quote:
A plan or package can contain SQL statements that use unqualified table and view names. For static SQL, the default qualifier for those names is the owner of the plan or package. However, we can use QUALIFIER option of the BIND command to specify a different qualifier.
Back to top
View user's profile Send private message
hariibm

New User


Joined: 05 Feb 2007
Posts: 61
Location: Chennai

PostPosted: Thu Mar 25, 2010 12:55 pm
Reply with quote

Is there any way to write a DB2 program which accesses tables that belong to two different databases.

There are two different database programs which do manipulations on each of the above mentioned tables separately.

These programs are already bound using their own Qualifier, owner etc.. parameters.

Now, I have a need of writing a program which will call the above two programs (ie, in turn it will do manipulations on tables from different databases). So, what are the things I need to take care while compiling this program?

Please let me know if the quesiton is not clear.
Back to top
View user's profile Send private message
hariibm

New User


Joined: 05 Feb 2007
Posts: 61
Location: Chennai

PostPosted: Thu Mar 25, 2010 1:05 pm
Reply with quote

Sorry. I just need to write a simple COBOL program not of DB2.
Back to top
View user's profile Send private message
hariibm

New User


Joined: 05 Feb 2007
Posts: 61
Location: Chennai

PostPosted: Thu Mar 25, 2010 1:08 pm
Reply with quote

One more clarificaiton is : both databases reside on the same DB2 subsystem.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Mar 25, 2010 2:53 pm
Reply with quote

different qualifiers, doesn't mean different databases per se.
just qualify your tables in you program :

select * from xxx.tab1, yyy.tab2
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Mar 25, 2010 7:24 pm
Reply with quote

What are you talking about?
Quote:

Is there any way to write a DB2 program which accesses tables that belong to two different databases.

OK you need a DB2 program to access two different databases.


Quote:

Sorry. I just need to write a simple COBOL program not of DB2.

OK this is not DB2 so you do not need to access any databases?


Quote:

One more clarificaiton is : both databases reside on the same DB2 subsystem.

OK so which is it DB2 or not?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Mar 25, 2010 8:06 pm
Reply with quote

Believe it or not, I think i get what you trying to do.

First off, as a matter of terminology, if believe you mean DATABASE as grouping of tables with a like qualifier. Please confirm this as your understanding.

That is not technically correct, but let's save that for another discussion.

I think (major psychic skills here), you want to write a new (non-db2) cobol program A. This program will call existing DB2 Program B which will manipulate data in 'Database' B. It will then call existing DB2 Program C which will manipulate data in 'Database' C. Please confirm this as your understanding.

This can be done, but how to do it depends on how your Plan/Package configuration is set up.

How are the packages for Program A and B bound? What does the Bind statement look like?

How are the Plans for these bound? What does the Bind statement look like?

What does the SYSTSIN card look like in your JCL.

Once ALL of these are answered, an approach can be worked on.
Back to top
View user's profile Send private message
hariibm

New User


Joined: 05 Feb 2007
Posts: 61
Location: Chennai

PostPosted: Thu Mar 25, 2010 9:54 pm
Reply with quote

GuyC,
Two different applications hosted on a mainframes server. And they make use of different databases.

daveporcelan,
Your below understanding is partially correct.
Quote:
I think (major psychic skills here), you want to write a new (non-db2) cobol program A. This program will call existing DB2 Program B which will manipulate data in 'Database' B. It will then call existing DB2 Program C which will manipulate data in 'Database' C. Please confirm this as your understanding.


I want to write a non DB2 program which will call a DB2 program B(for reading a table in database B). And it will call another DB2 program C to update data in a table in database C.

Both the programs are bound to different packages with different qualifiers, and owner.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Mar 25, 2010 10:48 pm
Reply with quote

Sounds good icon_confused.gif
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Mar 25, 2010 11:09 pm
Reply with quote

hariibm,

If your wondering about the odd smiley face icon, it is because you must not have read all of my post I worked so hard on. To help you out, I repeated it again. Pay particular attention to bold face type.

How are the packages for Program A and B bound? What does the Bind statement look like?
How are the Plans for these bound? What does the Bind statement look like?
What does the SYSTSIN card look like in your JCL?

Once ALL of these are answered, an approach can be worked on.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Fri Mar 26, 2010 2:06 pm
Reply with quote

DB2 z/OS terminology :
Database : a physical grouping of tablespaces. The application developer should have no idea in which database a table resides. The database of tables is irrelevant to a program.

so like dave tries to figure out , you can mean two things :

DB2 Subsystem : separate "environments" each with there own catalog which can be up or down independantly.

(table-) schema/creator/owner/qualifier : a logical grouping of tables usually used as the first part of : select * from tbcreator.tbname
or for unqualified tables specified on the bind statement.
Back to top
View user's profile Send private message
Poha Eater

New User


Joined: 31 Aug 2016
Posts: 74
Location: India

PostPosted: Thu Jun 28, 2018 11:52 pm
Reply with quote

Hi,

I know i am commenting on more than 8 year old thread. But i was going through these comments and found that TS didnt answer the questions which daveporcelan asked so that he can provide the answers.

I have seen on the forum previously if comments are added after such a long interval usually the post get locked. But before doing that can daveporcelan tell us how we can achieve the result for

Quote:
you want to write a new (non-db2) cobol program A. This program will call existing DB2 Program B which will manipulate data in 'Database' B. It will then call existing DB2 Program C which will manipulate data in 'Database' C.


or if GuyC can tell
Quote:
just qualify your tables in you program :

select * from xxx.tab1, yyy.tab2


if we qualify the table in the COBOL-DB2 programs with these qualifiers (i.e. xxx & yyy) then dont we need to mention QUALIFIER parameter in the BIND jcl ? Or if we also mention the QUALIFIER parameter in the jcl as well in the same scenario then what will happen ?

Please let me know before closing this topic. It will be a really helpful info.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri Jun 29, 2018 12:03 am
Reply with quote

Only if you share some of the poha..!
Back to top
View user's profile Send private message
Poha Eater

New User


Joined: 31 Aug 2016
Posts: 74
Location: India

PostPosted: Fri Jun 29, 2018 12:10 am
Reply with quote

Quote:
Only if you share some of the poha..!



sure why not.... icon_biggrin.gif icon_razz.gif
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Fri Jun 29, 2018 1:22 am
Reply with quote

Quote:
if we qualify the table in the COBOL-DB2 programs with these qualifiers (i.e. xxx & yyy) then dont we need to mention QUALIFIER parameter in the BIND jcl ? Or if we also mention the QUALIFIER parameter in the jcl as well in the same scenario then what will happen ?
Please start a new topic next time, In this case whatever you used qualifier in the program will take precedence over what has provided in BIND card for that particular table.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Timestamp difference and its average ... DB2 11
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts What is the difference between Taskty... Compuware & Other Tools 2
Search our Forums:

Back to Top