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

Problem during Precompilation


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Wed Oct 10, 2007 11:23 am
Reply with quote

Hi,

Can you please advice or any idea on this error. Iam unable to precompile the code. The job is failing at the bind step.

DSNX200I _ BIND SQL ERROR
USING XXXDEVU1 AUTHORITY
PLAN=(NOT APPLICABLE)
DBRM=Test065C
STATEMENT=4513
SQLCODE=-204
SQLSTATE=42704
TOKENS=XXXDEVU1.TXXBKNG
CSECT NAME=DSNXOTL
RDS CODE=-500

Thanks in advance...
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Oct 10, 2007 11:34 am
Reply with quote

If You want to helped, why don' t You try to show that You tried??

A smart way of asking would have been:

writing as if I were You
I got ... blah blah...
I searched the message reference and found that :
Quote:
SQLCODE -204 Object not defined to DB2

please help me in the good direction o solve my error

the reply
review Your query, maybe You are referring to an entity which is not defined in Your db2...
Back to top
View user's profile Send private message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Wed Oct 10, 2007 11:57 am
Reply with quote

Thanks...

Yes i had given a try before posting for the same... i reviewed the queries in the code all the entites are defined in the database. But not sure exactly where it going wrong and to correct.

Any idea to look otherway round....

cheers,
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Oct 10, 2007 12:12 pm
Reply with quote

Quote:
Any idea to look otherway round....


One of the possible causes of SQLSTATE=42704
could be a mismatch on the table/schema name
usually at the qualification level

for example
select .... from TABLE
at bind will try to resolv the from youruserid.TABLE
and .....
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Wed Oct 10, 2007 12:48 pm
Reply with quote

rajandhla wrote:
Thanks...

Yes i had given a try before posting for the same... i reviewed the queries in the code all the entites are defined in the database. But not sure exactly where it going wrong and to correct.

Any idea to look otherway round....

cheers,



i think the table is not available for the rsepective userid that u have specified.

psl check it once and precompile it again
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Wed Oct 10, 2007 1:36 pm
Reply with quote

The reason is that the FROM clause of the SQL statement contains a synonym name instead of a qualified or unqualified table name.

Check:
1) Qualifier name of a package or plan
2) Unqualified and qualified name of a table or view
Back to top
View user's profile Send private message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Wed Oct 10, 2007 3:20 pm
Reply with quote

hi,

mismatch is happening for the highlevel qualifiers of the table. As the sqlid is different during creation of the table and owner supplied during bind is different.

please advice how to overcome the problem...
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Wed Oct 10, 2007 3:27 pm
Reply with quote

rajandhla wrote:
hi,

mismatch is happening for the highlevel qualifiers of the table. As the sqlid is different during creation of the table and owner supplied during bind is different.

please advice how to overcome the problem...


Take the tables grant and then bind it....


else bind with the prev id and take grant of the paln
Back to top
View user's profile Send private message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Wed Oct 10, 2007 3:37 pm
Reply with quote

Hi Sri,

Thanks for your promt reply

Quote:
else bind with the prev id and take grant of the paln


Can you please bit clear on this point?

Cheers
Back to top
View user's profile Send private message
omnamashiva

New User


Joined: 24 Sep 2007
Posts: 10
Location: chennai

PostPosted: Wed Oct 10, 2007 4:43 pm
Reply with quote

Hi friend,
To solve your problem. Please verify it

1. check proper DRBMlib for that region
2. verify plan and package qualifer in bind package and plan jcl
3. Verify if there is table change in that region ( i hope this would be problem)

If above things is not solving your problem let me know

Regards,
Arunachalla
Back to top
View user's profile Send private message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Wed Oct 10, 2007 4:52 pm
Reply with quote

Dear Friend,

You are very near to my problem in predicting.

Quote:
3. Verify if there is table change in that region ( i hope this would be problem)
Quote:


Yes there are few changes for the old tables and few new tables are also created.

Please advice me on this how to resolve this ...

cheers
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Wed Oct 10, 2007 4:54 pm
Reply with quote

rajandhla wrote:
Hi Sri,

Thanks for your promt reply

Quote:
else bind with the prev id and take grant of the paln


Can you please bit clear on this point?

Cheers



Hi let us assume u r binding the tables of sri.So ask sri to grant on all the tables u need.Then u can bind with ur ID.

Else Let us assume all the tables belongs to Sri.So Sri will bind the paln n give grant on that plan to u to execute.

i hope its clear for u now.
Back to top
View user's profile Send private message
omnamashiva

New User


Joined: 24 Sep 2007
Posts: 10
Location: chennai

PostPosted: Wed Oct 10, 2007 7:29 pm
Reply with quote

Hi rajandhla,
What all the table changes ( for example : any new column is added/deleted then add/delete column to query in program if necessary . verify with your Db2 DBA / team lead whether DCLGEN is created for table change . If they did not did it ask them to create DCLGEN , and added it to your region then compile your program . I hope your problem will be solved

Regards,
Arunachalla


rajandhla wrote:
Dear Friend,

You are very near to my problem in predicting.

Quote:
3. Verify if there is table change in that region ( i hope this would be problem)
Quote:


Yes there are few changes for the old tables and few new tables are also created.

Please advice me on this how to resolve this ...

cheers
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Oct 10, 2007 8:14 pm
Reply with quote

Quote:
DSNX200I _ BIND SQL ERROR
USING XXXDEVU1 AUTHORITY
PLAN=(NOT APPLICABLE)
DBRM=Test065C
STATEMENT=4513
SQLCODE=-204
SQLSTATE=42704
TOKENS=XXXDEVU1.TXXBKNG
CSECT NAME=DSNXOTL
RDS CODE=-500

The line with TOKENS= contains the values that have to be applied to the message.
For instance, the message for SQLCODE -204 is:
Quote:
name IS AN UNDEFINED NAME

Therefore, the full message would be: "XXXDEVU1.TXXBKNG IS AN UNDEFINED NAME"
That is a good start...
The line "STATEMENT=4513" gives also an interesting information.

Here is another example:
Quote:
DB2T BIND SQL ERROR
USING TRTO AUTHORITY
PLAN=(NOT APPLICABLE)
DBRM=TR#MRS02
STATEMENT=128
SQLCODE=-206
SQLSTATE=42703
TOKENS=TRANSACTION-CODE
CSECT NAME=DSNXORSO
RDS CODE=-100

SQLCODE -206 gave me the message:
Quote:
column-name IS NOT A COLUMN OF AN INSERTED TABLE, UPDATED TABLE, OR ANY TABLE IDENTIFIED IN A FROM CLAUSE, OR IS NOT A COLUMN OF THE TRIGGERING TABLE OF A TRIGGER

message + TOKENS give "TRANSACTION-CODE IS NOT A COLUMN OF AN INSERTED TABLE..."
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
No new posts Need to add field to copybook, proble... COBOL Programming 14
Search our Forums:

Back to Top