Q
Problem solve Get help with specific problems with your technologies, process and projects.

Is the SQL Path being used?

I am running interactive SQL (STRSQL) on iSeries at V5R1 set path a73dta2 PATH statement complete.
 select imlitm                       
     from f4101                       
     FETCH FIRST 10 ROWS ONLY         
  F4101 in *LIBL type *FILE not found. 
> select imlitm                   
     from a73dta2/f4101           
     FETCH FIRST 10 ROWS ONLY     
  SELECT statement run complete. 

It seems the iSeries is not using the PATH, except for "The SQL path is an ordered list of schema names. The database...

manager uses the path to resolve the schema name for unqualified distinct type names (both built-in types and distinct types), function names, and procedure names..."

Can you see from this what I am missing?

Yes, the SQL Path is not used for unqualified table names. The SQL Path is only used by DB2 when you have an unqualified procedure or function name in an SQL statement.

If you're at V5R2 or V5R3, you can use the SET SCHEMA statement for unqualified view & table names. Another alternative is using the *SYS SQL Naming option which uses the OS/400 library list to search for unqualified table & view names.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

Visit the ITKnowledge Exchange and get answers to your DB2 questions fast.

Check out this Search400.com Featured Topic: Expert advice on DB2

Search400.com's targeted search engine: Get relevant information on DB2/400.

The Best Web Links: Tips, tutorials and more.

This was last published in January 2005

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close