×
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.
The CREATE PROCEDURE command has to be run through interactive SQL and not embedded in the program.
Matt
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of DLee@xxxxxxxx
Sent: Friday, March 20, 2009 12:10 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Stored Procedures
Pat
Thanks for your examples:
In going thru them, and attempting to mimic some of your code.
I'm new at stored procedures, so attempting to keep it simple.
I can't get my program to compile when I use the SET PATH "QSYS","QSYS2";
I create the proc in an sqlrpgle program like below.
C/EXEC SQL
C+ SET PATH "QSYS","QSYS2";
C+ CREATE PROCEDURE CRPRDLIBTS/STR004SP
C+ (COCD INOUT CHAR(2),
C+ AGNT INOUT CHAR(10),
C+ POLM INOUT CHAR(10),
C+ POLS INOUT DEC(3,0),
C+ COVC INOUT DEC(3,0),
C+ CANDTE INOUT DEC(8,0),
C+ REF INOUT DEC(9,2),
C+ RTN INOUT CHAR(02))
C+ (SPECIFIC CRPRDLIBTS/STR004SP NOT DETERMINISTIC NO SQL
C+ EXTERNAL NAME CRPRDLIBTS/STR004 LANGUAGE RPGLE SIMPLE CALL)
C/END-EXEC
I do put it above the create procedure, but it doesn't like the ; then
when I remove it, I still get an error about the end statement.
Also, how do I set my naming convention to sql or iseries.
The stored procedures manuals seems to talk all around it but not how to
set it.
What I want to be able to do is call a stored procedure from RPGLE,
In the rpg program I call the stored procedure like below:
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.