× 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.



Any chance we can get back to the original and see if there's some option
in Create Procedure or some such thing which allows a stored procedure to
use 3 part naming without having to use a custom sql package on the remote
system?

On Tue, Oct 17, 2023 at 8:57 AM Rob Berendt <robertowenberendt@xxxxxxxxx>
wrote:

I have a sql stored procedure which basically looks like the following:

CREATE PROCEDURE robxyz.PROPAGATE_QLNKOMT()
LANGUAGE SQL MODIFIES SQL DATA
SET OPTION DATFMT = *ISO

P1 : BEGIN
DECLARE OMIT_LIST CHARACTER VARYING ( 32000 ) ;

SELECT FSXCMD INTO OMIT_LIST
FROM QUSRBRM . QA1AFS
WHERE FSNAME = 'QLNKOMT'
;
UPDATE GDI . QUSRBRM . QA1AFS
SET FSXCMD = OMIT_LIST
WHERE FSNAME = 'QLNKOMT' ;

...

...

...

The problem is, when I make a change to it and call it again the UPDATE
GDI ..... statement fails to do the desired updating and I get:

SQL0818 - Consistency tokens do not match -

Cause . . . . . : Package PROPA00001 in ROB on application server GDIHQ
cannot be run with the current application program because either the
application program has been recompiled without rebuilding the package or
the package has been restored from a back level version. Recovery . . . :
Rebuild the package by using the CRTSQLPKG command or by using a CRTSQLxxx
command specifying the correct relational database. Otherwise, restore the
package from a version which matches the application program being run.

Which basically forces me to rebuild the sql package on each target
machine. Heck I'm not even calling a stored procedure on each target
system so why do I need the package? Is there some option on CREATE
PROCEDURE to it not to need a target sql package? Like a SET OPTION
statement or some such thing?

I didn't see an option on the CALL to handle this


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.