|
When calling an external program, I have the NO SQL phrase in there. Even
if the RPG program is doing SQL. From what I understand, you don't have
anything going on in this procedure you are creating. So there's no sql in
it. I could be wrong, and correct me if so.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:
midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Michael Ryan
Sent: Monday, July 19, 2010 1:35 PM
To: Midrange Systems Technical Discussion
Subject: Re: Create Procedure/READS SQL DATA
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 isstatement
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
are in violation of this rule.list
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?
Thanks...
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.