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



This (Stored Procedure implementation) is an area where my experience is
very limited. But from what I understand, your removal of the clause from
the CREATE PROCEDURE statement did not change the fact that rules are being
violated. (A key point to notice is that your error is happening at run
time. That would seem to imply that the procedure is doing something that
wasn't mentioned in the CREATE...)

Not sure where the MODIFIES SQL DATA is coming from, but I would think
that's relevant.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"If an animal does something, we call it instinct; if we do the same thing
for the same reason, we call it intelligence."
-- Will Cuppy


That's what I thought too. I have added and removed the READS SQL DATA
phrase, and still resulting in the same error. Doing a Generate SQL
from my
procedure shows:

CREATE PROCEDURE NEWSYS.GETGEO100R (
IN INIPADDR CHAR(15) ,
OUT OTLOCATION INTEGER ,
OUT OTCOUNTRY CHAR(2) ,
OUT OTREGION CHAR(2) ,
OUT OTCITY CHAR(20) ,
OUT OTPPOSTAL CHAR(9) ,
OUT OTLAT CHAR(20) ,
OUT OTLONG CHAR(20) ,
OUT OTMETRO CHAR(3) ,
OUT OTAREA CHAR(4) )
LANGUAGE RPGLE
SPECIFIC NEWSYS.GETGEO100R
NOT DETERMINISTIC
MODIFIES SQL DATA
CALLED ON NULL INPUT
EXTERNAL NAME 'NEWSYS/GEO100R'
PARAMETER STYLE GENERAL ;

It inserted the MODIFIES SQL DATA clause...wonder if that's a problem
(ala
READS SQL DATA).

On Mon, Jul 19, 2010 at 1:18 PM, Dennis Lovelady
<iseries@xxxxxxxxxxxx>wrote:

To me, the English second-level text from DSPMSGD SQL0579 QSQLMSG is
brilliantly clear. "CONTAINS SQL DATA cannot be specified on the
CREATE
PROCEDURE ... statements for an SQL procedure or function if the
routine
body contains statements that read data."

The combination of CONTAINS SQL ... READS SQL DATA in your CREATE
statement
are in violation of this rule.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"The honeymoon is over when he phones that he'll be late for supper -
and
she has already left a note that it's in the refrigerator."
-- Bill Lawrence


I'm receiving an SQL0579 error when I attempt to run a procedure
from a
remote system. Here's the create procedure command:

CREATE PROCEDURE NEWSYS/GETGEO100R(IN InIPAddr CHAR ( 15), OUT
OtLocation INT , OUT OtCountry CHAR (2 ), OUT OtRegion CHAR (2 ),
OUT OtCity CHAR (20 ), OUT OtpPostal CHAR (9 ), OUT OtLat CHAR (20
), OUT OtLong CHAR (20 ), OUT OtMetro CHAR (3 ), OUT OtArea CHAR (4
)) LANGUAGE RPGLE NOT DETERMINISTIC CONTAINS SQL EXTERNAL NAME
NEWSYS/GEO100R PARAMETER STYLE GENERAL READS SQL DATA

I *am* making the connection, but the remote system fails with the
SQL0579.
I thought it might be the READS SQL DATA phrase, but I added that
(drop/create) and it doesn't seem to matter.

I have tried many combinations, but can't seem to get this right.
Any
ideas?



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.