Library list path in V5R3 - IBM AS400

This is a discussion on Library list path in V5R3 - IBM AS400 ; Hi, We have a product written in C that uses CLI to run dynamic queries and stored procedures. We used to build our product on V5R1 and we recently moved to build on V5R3, but we still use a target ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Library list path in V5R3

  1. Library list path in V5R3

    Hi,

    We have a product written in C that uses CLI to run dynamic queries
    and stored procedures. We used to build our product on V5R1 and we
    recently moved to build on V5R3, but we still use a target of
    TGTRLS(V5R2).

    What we find is that when we run a stored procedure which internally
    refers to an unqualified table name, the table is not found even if
    the job description includes the table library in the library list.
    This is not the way things behaved in our old build on V5R1. I was
    unable to find a PTF referring to this scenario and frankly I'm also
    finding little reference to what the search path is supposed to be in
    such a scenario. It makes sense to me that it would be the LIBL of the
    job, but this is not what I'm seeing in this case.

    Any help/advise in moving forward would be appreciate ....

    Thanks,
    Tzachi


  2. Re: Library list path in V5R3

    Just a question:
    Did you only store and restore the existing strored procedures or did
    you recreate these objects under the new release?

    It seems to me, that you used to use system naming before and now SQL
    naming is used.
    When system naming is used the library list will be searched to find
    unqualified objects.
    When SQL naming is used and unqualified tables are specified, these
    tables are searched in a library that has the same name as the user
    who executes this SQL-statement.

    Birgitta


  3. Re: Library list path in V5R3

    Tzachi wrote:
    > Hi,
    >
    > We have a product written in C that uses CLI to run dynamic queries
    > and stored procedures. We used to build our product on V5R1 and we
    > recently moved to build on V5R3, but we still use a target of
    > TGTRLS(V5R2).
    >
    > What we find is that when we run a stored procedure which internally
    > refers to an unqualified table name, the table is not found even if
    > the job description includes the table library in the library list.
    > This is not the way things behaved in our old build on V5R1. I was
    > unable to find a PTF referring to this scenario and frankly I'm also
    > finding little reference to what the search path is supposed to be in
    > such a scenario. It makes sense to me that it would be the LIBL of the
    > job, but this is not what I'm seeing in this case.
    >
    > Any help/advise in moving forward would be appreciate ....


    Try doing a SET SCHEMA statement in your SQL.

  4. Re: Library list path in V5R3

    Thanks for the suggestion, but that wasn't it. I managed to figure out
    the problem. It is unrelated to the specific version - I was on the
    wrong track there. It turns out that the other change between the
    version that worked and the one that didn't was that we switch to
    server-mode (yeah -I would have mentioned it if I were aware of
    it ;-) ). Apparently this is a known restriction of server mode when
    using CLI. In this mode, our job is not the one actually running the
    SQL and hence our library list has no affect. The job running the SQL
    is a QSQSRVR job running under the QSYSWRK subsystem.

    I found an interesting thread that deals with this problem in the
    context of the IBM JDBC connector (which is just another CLI client
    using server mode for the purpose of this discussion...).

    http://archive.midrange.com/java400-.../msg00067.html

    Thanks,
    Tzachi


+ Reply to Thread