I enjoy using Linoma's Surveyor product to do this (one free license with
each machine so you can try it out). They have an interface for displaying
a list of all available SQL External Stored Procs and then you can execute
it, at which time it will prompt you for the parms.
On the RPG side, I believe you need to implement the SQL CLI (Call Level
Interface) to make it work as it requires the passing/receiving of data, and
"embedded" sql in RPG doesn't support that (as I understand it - been awhile
since I tried it).
HTH,
Aaron Bartell
http://mowyourlawn.com
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Fleming, Greg (ED)
Sent: Monday, September 10, 2007 4:19 PM
To: Midrange Systems Technical Discussion
Subject: Syntax for calling stored procedure
I created a stored procedure from STRSQL like so:
CREATE PROCEDURE gnodgdf/getShortSKU(
OUT ShortSKU CHAR(7),
IN Company CHAR(3),
IN SoldTo CHAR(9),
IN Item CHAR(12))
LANGUAGE RPGLE
SPECIFIC GNODGDF/ORDERAPI_getShortSKU
NOT DETERMINISTIC
NO SQL
CALLED ON NULL INPUT
EXTERNAL NAME 'GNODGDF/SORDERAPI(ORDERAPI_GetShortSKU)'
PARAMETER STYLE GENERAL
I got the message indicating that it was successfully created.
Now the question. How do I call it ? Can I test this interactively from
STRSQL or Iseries Navigator RUNSQL Scripts ?
What's the correct syntax ?
If not, what's the correct syntax using EXEC SQL in RPG (/Free) ?
Thanks
Greg Fleming
Senior Programmer/Analyst
Everglades Direct, Inc.
--
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.