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



Probably better in RPG400 Mark because it has zero to do with the wizard - so if you want to continue the discussion let's take it there. But ...

There is no native RPG way of doing this. Variable length arrays are not supported.

The easy fix - and the one that would benefit all users of the called routine would be to use V7's RTNPARM which will automagically convert the return value to be parm 1 under the covers. This means that only a pointer gets passed and that means the length of the array is irrelevant.

If not on V7 then the answer is to change the procedure to return the active count and make the array a parm.

Anything else means that the whole array will always be passed.

The new XMLSERVICE routines have a nice approach which actually handles your scenario and might work for you but the service will not be as efficient due to the extra layer. It basically allows you to define an array as depending on a specified count value and then only builds the XML response to contain that many instances.


On 2013-07-11, at 3:45 PM, Mark Brier <mark@xxxxxxxxx> wrote:

I have a question regarding the Program Call Wizard. The RPG program
that I am using returns an array that may or may not be completely
filled with data. I don't want to return all of the blank regards to
the web service that I am creating from this. I have tried making the
Count on the Structure be a variable that I return from the program that
has how many records have data, but whenever I run the web service I get
a Program Call Error saying the value of this field is not set. Can
this Count field contain a variable?

If this is not the appropriate place for this kind of question, please
let me know.

Mark


--

Jon Paris

www.partner400.com
www.SystemiDeveloper.com





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.