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
 

 

Problem during Precompilation

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Problem during Precompilation
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Oct 10, 2007 11:34 am    Post subject: Reply to: Problem during Precompilation
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Oct 10, 2007 12:12 pm    Post subject: Reply to: Problem during Precompilation
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: 216
Location: India

PostPosted: Wed Oct 10, 2007 12:48 pm    Post subject:
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    Post subject:
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    Post subject:
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: 216
Location: India

PostPosted: Wed Oct 10, 2007 3:27 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: Problem during Precompilation
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    Post subject:
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: 216
Location: India

PostPosted: Wed Oct 10, 2007 4:54 pm    Post subject:
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    Post subject:
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: 1224
Location: Israel

PostPosted: Wed Oct 10, 2007 8:14 pm    Post subject:
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    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 SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm
No new posts Problem with GETMAIN command amitc23 CICS 6 Thu Sep 01, 2016 1:01 pm


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