×
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.
Ok...I want to call a procedure in a service program from embedded SQL. The
reason I'm using embedded SQL is that I want the called procedure to return
a result set that the caller will consume. I'm on 7.1, so I know I can
produce a result set in the called by using this:
Exec SQL
Set Result Sets For Return To Client
Array :ReturnDS For :WkRowcount Rows;
And consume the result set in the caller with this:
// Call Stored Procedure
Exec SQL
Call Msp101R(:WkVnda, :WkMdl);
// Associate result set and result set locator
Exec SQL Associate Result Set Locator (:rResultDS)
with Procedure Msp101R(Char(5), Char(20));
// Define a cursor associated with the result set
// and Open the cursor
Exec SQL Allocate Csr01 Cursor For Result Set :rResultDS;
But I'd rather not use an SP if I don't have to - just another 'wrapper'
that I'd rather not use.
Question: Can I call a service program procedure from embedded SQL?
Question: Can I use Associate Result Set without using a Stored Procedure?
I want to the called procedure (that returns the result set) to be
available to both RPG and PHP.
Thanks!
As an Amazon Associate we earn from qualifying purchases.
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.