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 

Question regarding Collection IDs

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


Joined: 27 Aug 2007
Posts: 102
Topics: 42
Location: Chennai

PostPosted: Fri Mar 28, 2008 10:01 am    Post subject: Question regarding Collection IDs Reply with quote

I have a program A which is under two different collection IDs C1 and C2. All the timestamp/Concurrency tokens are the same. If When I execute this program which collection ID will my program refer?

For example
There are two concurrent applications using this same program A. A is defined under the first application schema with collection ID C1 and it is defined under the second application schema with collection ID C2. When I execute which collection ID will it refer?
_________________
Thanks
Back to top
View user's profile Send private message Yahoo Messenger
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Mon Mar 31, 2008 7:09 am    Post subject: Reply with quote

Hello Edward,

you execute your application programs under a DB2 plan. In this plan you concatenate collection ids, and the package used during program execution will be the first occurance with the appropriate timestamp/consistency token in this list of collection ids.

regards
Christian
Back to top
View user's profile Send private message
edkir98
Beginner


Joined: 27 Aug 2007
Posts: 102
Topics: 42
Location: Chennai

PostPosted: Mon Mar 31, 2008 8:41 am    Post subject: Re Reply with quote

Chris

My question was different.

Consider this example:
Suppose we have one set of tables for one group of clients, and another set of tables for another group of clients. The high-level qualifiers used for the two sets of tables are GROUP1 and GROUP2 , respectively. In such a case we can set up two collections, also called GROUP1 and GROUP2 . All programs use unqualified table names in SQL statements (that is to say, you have SELECT COL1 FROM EMPLOYEE instead of having SELECT COL1 FROM GROUP1.EMPLOYEE ). Every program is bound into each of the two collections. When binding program PROGXYZ into collection GROUP1 , we specify that GROUP1 is to be used as the high-level qualifier for unqualified table names (this is accomplished by specifying QUALIFIER(GROUP1) on the BIND PACKAGE command). When binding the same program into the GROUP2 collection, we specify QUALIFIER(GROUP2) on the BIND PACKAGE command.

How will I differentiate the two collection IDs and make the program execute for the two different tables simultaneously?
_________________
Thanks
Back to top
View user's profile Send private message Yahoo Messenger
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Tue Apr 01, 2008 2:50 am    Post subject: Reply with quote

Hello Edward,

in our shop we use two different DB2 plans for this purpose.

The other alternative is to set the variable CURRENT PACKAGESET in your program, probably reading the appropriate collection name during program start. With this register set only the named collection is considered during program execution time.

But using this you have to fiddle with the program code, so to my eyes, the usage of different plans (one for each table qualifier) is preferable.

regards
Christian
Back to top
View user's profile Send private message
RMi
Beginner


Joined: 21 Jun 2006
Posts: 8
Topics: 0
Location: India

PostPosted: Wed Apr 02, 2008 4:03 am    Post subject: Reply with quote

Hello Edward,

As Christian said, you will have to go for CURRENT PACKAGESET if you have only one plan for both the groups. I would say that it is better to have a wrapper program for all your batch programs which will do the packagesetting, rather than coding it in all the programs. For online programs, you will have to have it in all the programs or a subprogram which does packageset.

Regards,
RMi
Back to top
View user's profile Send private message
edkir98
Beginner


Joined: 27 Aug 2007
Posts: 102
Topics: 42
Location: Chennai

PostPosted: Wed Apr 02, 2008 6:32 am    Post subject: Reply with quote

Hi RMI and Christian
I can understand what you say. But how is that we'll pass a parameter for CURRENT PACKAGESET thru online?

If it were batch I could pass the parameter to the linkage area variable from the JCL but how do we do it for the onlines?
_________________
Thanks
Back to top
View user's profile Send private message Yahoo Messenger
RMi
Beginner


Joined: 21 Jun 2006
Posts: 8
Topics: 0
Location: India

PostPosted: Wed Apr 02, 2008 7:55 am    Post subject: Reply with quote

You have store the parameter some where you can access from CICS. It could be

1) A VSAM file
2) In a DB2 table belonging to the default colletion ID (In your case it can be group1)
3) Hardcode in the program itself (for all the possible regions like developments, QA and Prod)

Regards,
RMi
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