Not sure this helps, but this looks like you are trying to create a function
to me. If you create a function, then something like this would test...
Select company, soldTo, Item, getShortSKU(company,soldTo,Item) as ShortSku
from file1
Here is the faq that shows how to create functions
http://faq.midrange.com/data/cache/185.html
Mike Krebs
-----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.