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



<snip>
Alan, I could be wrong but I don't think you can have executable
statements
preceding declares in the routine body, on System i at least.
</snip>

Right you are Elvis.

You cannot have anything in front of the Declares. I just moved the Call
statement after the declares and it compiles fine.

Getting myself confused with RPG where you can put the declare cursor
anywhere before you do the open. With SQL Language, declares have to be
first. Stumbled across in a manual.

Thanks.

Also, as an aside, I implemented the same stored procedure as an RPG/ILE
service program. Man, take about fast. First time I have done this. I
had used service programs to implement user defined functions but didn't
realize until the other day that I could implement stored procedures as
service programs, also.

Nice thing about doing this is you can have multiple procedures in a
single service program to implement multiple stored procedures.

Create Procedure MAPDBA/MRPGETSTATUS
(In InMapicsEnvironment Char(2),
In InItemNumber VarChar(15))
Result Sets 1
Language RPGLE
Not Deterministic
Reads Sql Data
External Name 'MAPDBA/MRP001(MRP_GETSTATUS)'
Parameter Style General;

Create Procedure MAPDBA/MRPEXPLODEBILL
(In InMapicsEnvironment Char(2),
In InItemNumber VarChar(15))
Result Sets 1
Language RPGLE
Not Deterministic
Reads Sql Data
External Name 'MAPDBA/MRP001(MRP_EXPLODEBILL)'
Parameter Style General;




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.