Let's say I have this program interface
d PgmText pi
d outInfo 65535
d pgmName 10 const
d pgmLibrary 10 const
I'm calling it through JTOpen
, which then reads the data assigned to the input/output parameter outInfo
. The issue is that the %alloc
-ated data exceeds the maximum dimension of outInfo
.
Thus, what should I do?
E.g. I could pass an AS400ByteArray
as ProgramParameter.PASS_BY_REFERENCE
, but then what do I do in the RPG code?
N.B. it must be compatible with V5R1.
It seems the best possible choice is the User Space.
For example, let's say we need to extract the source code from a
*PGM
object, which we'll then read fromJTOpen
. To accomplish that, we write the following RPG program, which given a*PGM
qualified path and a*USRSPC
qualified path, writes to that User Space.From the JVM layer, simply
ProgramCall
this RPG program, and then read with aUserSpace
.