× 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 have a stored procedure that I want to use in a SQL where clause.
Something like this. I know this doesn't work.

Select * from myLib.TableRRR R
where R.PlnYr = (CPLnyer of call myLib.SPGETCPLNY ('AS',5,0,0,0,0,' '))

I want R.PlnYr to equal the output parameter #4 of the procedure call.
-------
The stored procedure is fairly straightforward.
CREATE or REPLACE PROCEDURE myLib.SPGETCPLNY
(
INOUT client char(2)
,INOUT rnum numeric(7,0)
,INOUT LPlnYer numeric(4,0)
,INOUT CPlnYer numeric(4,0)
,INOUT NPlnYer numeric(4,0)
,INOUT SrchDate numeric(8,0)
,INOUT found char(1)
)
EXTERNAL NAME MyLib.RPLANSQL
LANGUAGE RPGLE
PARAMETER STYLE GENERAL
-------
When I call this via ACS-RSS this is my results in the message tab:
call myLib.spgetcplny ('AS', 5, 0,0,0,0,' ')
Return Code = 0
Output Parameter #1 (CLIENT) = AS
Output Parameter #2 (RNUM) = 5
Output Parameter #3 (LPLNYER) = 2021
Output Parameter #4 (CPLNYER) = 2022
Output Parameter #5 (NPLNYER) = 2023
Output Parameter #6 (SRCHDATE) = 20220418
Output Parameter #7 (FOUND) = Y
-------

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.