dbTalk Databases Forums  

SQL0204

ibm.software.db2.os400 ibm.software.db2.os400


Discuss SQL0204 in the ibm.software.db2.os400 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
lburkett99@embarqmail.com
 
Posts: n/a

Default SQL0204 - 05-12-2009 , 11:03 AM






I am writing an RPG program using the SQL CLI API's. When I execute my query the return code is -1 and message SQL0204 is sent with text 'ITMST in LBURKETT type *FILE not found'. ITMST is one of two files in the query. LBURKETT appears to be a library name, which does exist but is not part of the query. LBURKETT is the user name of the job.

I have attached a copy of the query.

Reply With Quote
  #2  
Old   
CRPence
 
Posts: n/a

Default Re: SQL0204 - 05-12-2009 , 06:08 PM






lburkett99 (AT) embarqmail (DOT) com wrote:
Quote:
I am writing an RPG program using the SQL CLI API's. When I
execute my query the return code is -1 and message SQL0204 is
sent with text 'ITMST in LBURKETT type *FILE not found'. ITMST
is one of two files in the query. LBURKETT appears to be a
library name, which does exist but is not part of the query.
LBURKETT is the user name of the job.

I have attached a copy of the query.
Attachments are not supported to the NewsGroup interface, and my
DeveloperWorks ID has never been corrected by IBM even after I
talked to the help desk... it makes almost nine months ago.

But the described scenario is a side effect of standard SQL
naming rules. The /authorization ID/ is what is used to locate
unqualified TABLE names. Qualify the TABLE name, or establish the
request under the authorization ID which matches the SCHEMA [the
library] name, or if cross platform is of no concern then SET OPTION
NAMING *SYSTEM ;;; syntax of that SET may not be correct, and the
API might have another interface to set the option other than the
SET statement, I can not recall.

Regards, Chuck


Reply With Quote
  #3  
Old   
B.Hauser
 
Posts: n/a

Default Re: SQL0204 - 05-14-2009 , 11:14 AM



Hi,

you are working with SQL Naming (and not System-Naming).
When using System Naming the library list gets searched.
When using SQL naming, the tables, views and indexes are searched in a schema/library with the same name as the user profile that executes the query.
When using SQL Naming, you either have to qualify your tables/phyiscal files with the schema/libary name (MySchema.MyFile)
or execute the SQL Command SET CURRENT SCHEMA MySchema before executing your SQL statements.
... or search where you can set the naming and change back to System-Naming.

Birgitta

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.