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.
Re: SQL0204 - 05-12-2009 , 06:08 PM
lburkett99 (AT) embarqmail (DOT) com wrote:
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.
Re: SQL0204 - 05-14-2009 , 11:14 AM
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.