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
 

 

Difference between Qualifier and Owner

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Difference between Qualifier and Owner
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: 1187
Location: Bangalore,India

PostPosted: Thu Mar 25, 2010 11:47 am    Post subject:
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    Post subject: Reply to: Difference between Qualifier and Owner
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    Post subject:
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    Post subject:
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: 1278
Location: Belgium

PostPosted: Thu Mar 25, 2010 2:53 pm    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Thu Mar 25, 2010 7:24 pm    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Thu Mar 25, 2010 8:06 pm    Post subject:
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    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Thu Mar 25, 2010 10:48 pm    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Thu Mar 25, 2010 11:09 pm    Post subject:
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: 1278
Location: Belgium

PostPosted: Fri Mar 26, 2010 2:06 pm    Post subject:
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
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 Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm
No new posts Difference space showed for TS and it... autobox DB2 1 Thu Apr 14, 2016 1:07 pm
No new posts Difference Between CICS WebSupport an... sachinji84 CICS 1 Mon Mar 07, 2016 7:25 pm
No new posts Difference between -180 and -181 with... deepak_shrivastava DB2 4 Wed Jan 06, 2016 10:00 am
No new posts Difference between COBOL for MAINFRAM... dejunzhu COBOL Programming 1 Sat Oct 31, 2015 2:18 pm


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