× 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 think you are asking is there a way to return a variable sized field?
You know the program will return data in the second parameter, you just
don't know how much data.

Sorry, the answer is no.  You have to fill in the amount of data to return.
Many programs use a reasonable maximum, then have a way to tell the java
program how much data is actually in the buffer and if there is more.  For
example, suppose 95% of the time the program returns fewer than 32K of
data.  You set the program parameter return size to 32K.  That much space
is returned to the program so the caller and callee must agree on some way
to indicate how much useful data is in the buffer.  The caller and callee
must also agree on a way to indicate more data is present.  For example,
maybe the first four bytes of the 32K is the amount of data in the buffer.
The next four bytes is how much data is generated by the app.  The rest of
the buffer is the data.  If the first two number are equal, all data was
returned.  If not, the caller must make another call to get the rest of the
data.

David Wall
Toolbox for Java
iSeries ODBC Driver for Linux




                      OKogan@capitalfac
                      tors.com                 To:       java400-l@midrange.com
                      Sent by:                 cc:
                      java400-l-admin@m        Subject:  RE: Java to RPG 
question
                      idrange.com


                      03/04/2002 01:36
                      PM
                      Please respond to
                      java400-l







Hi, All.
How can I define an Array in java class as one of the output parameters to
RPG program and receive it back if neither RPG nor java knows number of
elements and it is not first or last element in ProgramParameter[]?

ProgramParameter[] parms = new ProgramParameter[2];
                         parms[0] = new ProgramParameter(3);
                         parms[1] = new ProgramParameter
(?????????????????);
                         parms[2] = new ProgramParameter(20);
                         call.setParameterList(parms);
Thank you.
Oleg.



The information transmitted by the following E-Mail is intended only for
the addressee and may contain confidential and/or privileged material. Any
interception, review, retransmission, dissemination, or other use, or
taking any action upon this information by persons or entities other than
the intended recipient is prohibited by law and may subject them to
criminal or civil liability. If you received this communication in error,
please contact us immediately at 954-730-2900 ext. 3600 and delete the
communication from any computer or network system.


_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.







As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.