I've just got DB2 access at work and this is the first program I am trying to run. I have got a theoretical idea about dbrm, packages and plans. I have very little knowledge on endevor.
I know a table that is access by a table that is access by a program from endevor. I am trying to perform a select query on that table.
Let’s consider the owner name of the table is XXXX and table name is YYYY
I’ve made two JCLs one compile and the second run
The first one has the DB2 precompiler DSNHPC, Cobol Compiler IGYCRCTL, Linker IEWL ( alias for IEWBLINK) and IKJEFT01 for binding dbrm with package.
The second runs the program and takes the package name via IKJEFT01
Problem 1:
I am unable to perform select queries that have the where clause
It says the column is not found in the table
I’ve tried putting the exact column name mentioned in the declare table clause and the working storage section entry that represents the table. Both don’t work.
Problem 2:
I’ve not made my own package but packaged using a random package that I came across in the DB2 Admin’s System Catalog option. The package I am using has the same owner XXXX of the table XXXX.YYYY
The code successfully binds but says that “doesn’t belong to the context where usedâ€
Problem 3:
As I somehow managed to compile the above db2 program, I tried to ran it with the JCL but I didn’t have a plan name yet. So I tried adding a plan with the DB2I option but it returned that my ID doesn’t have authorization to perform select on that table whereas I can go to the DB2A option and perform SQL statements directly. I tried putting in a random plan name but it returned MAXCC0 and SQLcode 81Q
Problem 4:
Is there an option or any way by which I can get a list on tables specifying what accesses I have on them ?
Problem 5:
This is more of a question rather than a problem.
When I see the program that has been moved to endevor, it has the declare table followed by only the table name i.e. declare table YYYY but when I used DCLGEN to make the declarations for that table it added the owner name to it too i.e. Declare table XXXX.YYYY
Please help.