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



"Steffan, Otto (GE Consumer Finance)" wrote:
> 
> Hello,
> 
> I have run out of ideas how to sort out this problem:
> I call a Java method getRSRows in my RPG program that returns an array of
> objects; what I need is
> Number of returned objects in the array.

Steffan, if the Java array had say 3 elements, then elements 4-10 of the
RPG array will be null.

  For  i = 1 to 10;                   
|   if RSRows(i) = *NULL;
|      leave;  // no more elements
|   endif;
    Acct = %dec(getOuacct(RSRows(i))); 
    if  Acct = 0.;                     
      leave;  // (i-1)=X is Number of objects in the array (??)

    endif;                             
  endfor;           

Also, if you own the Java class, you could add a method to return the
number of elements in the array.


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.