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



Hi, Matt:

I took the same route as you to find out that CONST is the way to go with
procedures that are the target of PARAMETER STYLE GENERAL on SQL CREATE
commands.

I hope someone will post such a link, as that documentation is sorely
missing from my library, too!

Not sure why you feel this would require you to "always change the
prototype." Seems to me (what works for me is) that for UDF and stored
procedures, my prototypes say CONST instead of VALUE. What problem does
this create for you?

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"We're proud of our restaurant. The public is invited to inspect at any
time. KEEP OUT!"
-- sign on kitchen door of a New Your City restaurant


D UcFirst pr 512 varying
D pString 512 value varying

I tried to define a SQL Procedure as such:

CREATE FUNCTION UCFIRST (
INSTR VARCHAR(512))
RETURNS VARCHAR(512)
LANGUAGE RPGLE
PARAMETER STYLE GENERAL...

I could call the procedure but it crashed with an 'index out of bounds'
error. When I debugged, I saw garbage in the parameter. So, I changed
the
prototype/interface to:

D UcFirst pr 512 varying
D pString 512 const varying

Note the keyword CONST instead of VALUE. Everything worked.

Can you not call RPGLE procedures from SQL if the procedure expects
values
passed by value? Just wondering if there is another way to solve this
without always changing the procedure definition. Also, is there a
document that discusses passing of parameters between RPG and SQL,
because
I cannot find one. I am sure I am just missing it.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.