× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



So, my questions are:
1) Why would it be recreating the *SQLPKG when the program is executed...or
As it trying to create it because they are not authorized to it so it thinks
it is not there?

There is a consistency token check between the client programm and the SQLPKG at the server an if diffrent client versions share the sam SQLPKG it is recreated. In this case the remote user needs enough capabilities to the already existing SQLPKG. This could be solved by using versioned names of the package at creation time of the client programm (CRTSQLRPGI or CRTSQLPKG)

2) Would there be something specific in the SQL statements that causes it
to rebuild? The name of the files that it is cleaning up changes each time
it is run so maybe that is related.

Thats not predictable as it is not documented. Using SQL CLI instead of embedded SQL doesn't use packages and the problem doesn't occur.

3) What machine and what profile is it using that is causing the authority
issue? Is it the dev box profile and authority or the prod box profile and
authority...or some weird combination of dev profile and prod authority or
vice versa?

Its only the authority at the server (connected user). But: a similar problem could occur, if diffrent versions are used at the same time, as the SQLPKG is locked at execution time.

4) I know when compiling the program on the dev box, I can specify where
the *SQLPKG is created. If I specify QTEMP for that parm, will it try to
recreate it in QTEMP and maybe that will eliminate my authority issue? I
really want to do this the right way so if this is just a workaround and not
the right answer, I'd prefer to do this only as a last resort.

This could be a solution. You will get some minor performance punishment, but it should be slightly faster (in theorie) than the dynamic alternative. Here we are mostly talking about microseconds or less, the biggest advantage of packages are static checking at compile time and some insight to the work of the database engine (PRTSQLINF) for better check of performace estimates (missing indexes etc.).

D*B

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.