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



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.

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.