UPDATE Re: Problems with SQL SET statements



Jonathan Ball wrote:
Jonathan Ball wrote:
First, what is the difference between

set option sqlpath = *libl

and

set path = *libl

at compile time (V5R3)? If I do the former, user defined functions are not resolved; with the latter, they are.

Secondly, SET SCHEMA isn't working. I specify it before declaring and opening a cursor, but DB2 doesn't find the files in the cursor because it is looking for them in a library with the same name as my group profile.

This is infuriatingly frustrating. If I specify naming=*SYS, then my tables are found (from *libl), but my UDFs aren't, even though I specify both

set option sqlpath = *libl

and

set path = *libl


If I specify naming=*SQL, then my UDFs are found but my files aren't, even though I specify

set schema = myschema


Why won't these work together?

As far as the (SQL)PATH manipulation, it turns out the developer I'm trying to assist had an incorrectly specified function usage. She had the same function used at a couple of points in her cursor declaration, but in one of them she was using an argument with the wrong data type. That accounted for the "function not found" issue.

I'm still mystified as to why SET SCHEMA isn't working when I run with NAMING=*SQL.
.



Relevant Pages

  • Re: Problems with SQL SET statements
    ... set option sqlpath = *libl ... set path = *libl ... I specify it before declaring and opening a cursor, but DB2 doesn't find the files in the cursor because it is looking for them in a library with the same name as my group profile. ...
    (comp.sys.ibm.as400.misc)
  • Re: query and *libl v5r2
    ... specify *LIBL, WRKQRY finds the file in the library list and replaces *LIBL. ... To run the query in a CL you use RUNQRY and on the QRYFILE parameter you ... Prompt RUNQRY and you'll know.) ...
    (comp.sys.ibm.as400.misc)