View previous topic :: View next topic
|
Author |
Message |
nikyojin
New User
Joined: 05 Oct 2005 Posts: 94
|
|
|
|
Hi,
In which step of a DB2 Cobol program compilation/execution is the owner parameter value assigned for Bind.
Thanks,
Nikhil .S. |
|
Back to top |
|
|
ragshere
New User
Joined: 20 Dec 2004 Posts: 70
|
|
|
|
Hi,
Your Question is not clear.
OWNER parameter is used during bind which will come in to the picture after compilation. bind step will assign the owner and creates the package under that owner.
Thanks
Rags |
|
Back to top |
|
|
nikyojin
New User
Joined: 05 Oct 2005 Posts: 94
|
|
|
|
Hi Rags,
In Our System We create the bind package prior to compilaton of the pgm.The Owner gets assigned during that time itself in the package library.Further the bind occurs during the compilation tim itself.
The problem which troubles me, the Owner obtained is not the RACF ID making the package.Is there any way in which I can come to know how this owner is getting assigned.
Thanks,
Nikhil .S. |
|
Back to top |
|
|
ragshere
New User
Joined: 20 Dec 2004 Posts: 70
|
|
|
|
Hi Nikil,
since you compiled the program after bind , this bind is not useful. And you did bind package after compilation it will replace existing package (or) add a new package depends on bind options.
Here you might have given a owner during bind (after compilation).
OWNER keyword is used for mentioning authorized ID. I mean the value (RACF id or RACF group) in OWNER should have previlege to bind the package. If you did not mention QUALIFIER parameter in bind , then all the tables mentioned in the program will use OWNER parameter value as their DB2 qualifier.
Otherwise "QUALIFIER.table name" will be used during execution of the program.
Hope you got me.If not,Please paste me the error you are getting so that I will try to explain.
Thanks
Rags |
|
Back to top |
|
|
MichaelKBS
New User
Joined: 10 Jan 2006 Posts: 24 Location: Germany
|
|
|
|
nikyojin wrote: |
Hi Rags,
In Our System We create the bind package prior to compilaton of the pgm.The Owner gets assigned during that time itself in the package library.Further the bind occurs during the compilation tim itself.
The problem which troubles me, the Owner obtained is not the RACF ID making the package.Is there any way in which I can come to know how this owner is getting assigned.
Thanks,
Nikhil .S. |
Hi Nik,
to run your DB2-COBOL-program, you use a DB2 PLAN
(In Batch you can see it in the JCL).
This PLAN refers to the PACKAGE(S) that you have bound after compilation.
The PACKAGE (and the PLAN as well) contain the OWNER keyword.
When running the COBOL-program all DB2 queries use the ID specified
in the OWNER keyword.
So the OWNER has to be granted on all DB2 tables used in the program,
while iit's not necessary that your user-id has privileges on the DB2 tables.
But you do have to be granted to use the PLAN and PACKAGE.
I hope this answers your question.
Take care,
Michael |
|
Back to top |
|
|
nikyojin
New User
Joined: 05 Oct 2005 Posts: 94
|
|
|
|
Hi Michael/Rags
Thanks for the Information given.
Problem:- A program ABC compiled in Test .Prior to compilation the package setup was done in test region.After compilation ABC was bound to production.
The bind JCL abended with SQLCODE -551.
The Owner used did not have the authority.
I changed the owner parameter value and the bind was successful when I passed this value thru SYSTIN.
I noticed the Owner was getting picked up prior to compilation when we were making the package setup.I actually wanted to know from where this owner is getting picked up.
Regards,
Nikhil .S. |
|
Back to top |
|
|
MichaelKBS
New User
Joined: 10 Jan 2006 Posts: 24 Location: Germany
|
|
|
|
How do you setup your package?
Do you use an utility or CLIST/REXX-Procedure? |
|
Back to top |
|
|
ragshere
New User
Joined: 20 Dec 2004 Posts: 70
|
|
|
|
Hi Nikil,
From your problem I can understand that, It is not DB2 problem.
It is in your bind job setup. I mean depends on how you are passing the parameters to bind step, it tried to bind. That means if you are passing test region owner to prod region bind step, it will fail.
DB2 will not use OWNER parameter by default. you have to provide.It will use the parameters you provided and try to bind.
In your case,test region owner may be passed by mistake. So you got
-551.
Let me know if you did not understand.
Thanks
Rags |
|
Back to top |
|
|
nikyojin
New User
Joined: 05 Oct 2005 Posts: 94
|
|
|
|
Thanks Rags and MichaelKBS for ur valuable suggestions.
The owner in our System comprises of the region in which the Package is being setup followed by the two initial letters of the "Program".Hence it was giving the Group Owner which is being obtained as stated above.Since my program was set up in Test the owner was the Test Region Owner which didn't have the authority in Production which resulted in, the Sqlcode -551 during Production Bind.
Regards,
Nikhil .S. |
|
Back to top |
|
|
|