Dunno your context, but the message is pretty clear, before any JNI / PASE , you need to have std... descriptors opened (in other cases, like qsh etc. they are pre opened for you...).
Check the relevant parts of
https://www.ibm.com/support/pages/getting-java-exception-trace-file-ile-rpg-calling-java
hope it helps
.c
On Tuesday, April 22, 2025 at 02:24:37 AM GMT+2, eric bothes <iseriesstuff@xxxxxxxxx> wrote:
I have an rpg program where i am using the java string class. has been
working fine until a change i made to call setpoiclass cl to set the
path of my java program. I was able to boil it down to the following
addenvvar command in the CL. When i comment it out, the code works fine.
I'm not sure if i need this environment variable at all. We do use
scotts POI integration heavily but most of those jobs run in batch and
maybe the reason why this has never happened before.
ADDENVVAR ENVVAR(QIBM_USE_DESCRIPTOR_STDIO) VALUE('I') REPLACE(*YES)
Dcl-Pr newString Object(*Java:'java.lang.String')
ExtProc(*Java:'java.lang.String':*CONSTRUCTOR);
*N Varchar(32767) Const;
End-Pr;
args(1) = newString(datain); ----- error on this line
Message ID . . . . . . : MCH5601 Severity . . . . . . . : 40
Message type . . . . . : Escape
Date sent . . . . . . : 04/21/25 Time sent . . . . . . :
20:15:38
Message . . . . : Template value not valid for instruction.
Cause . . . . . : The location of the value is template with an
offset to
field in bytes X'0008', an offset in field in bits X'001F', a length of
field of 4, and an instruction operand number of 1. The reason code is
X'0000'. If the reason code is X'0000', a reason code may not be
available.
Message ID . . . . . . : CPFB9C8 Severity . . . . . . . : 40
Message type . . . . . : Escape
Date sent . . . . . . : 04/21/25 Time sent . . . . . . :
20:15:38
Message . . . . : File descriptors 0, 1, and 2 must be open to run the
PASE
for i program.
Cause . . . . . : When ILE environment variable
QIBM_USE_DESCRIPTOR_STDIO is
Y or I, Integrated File System file descriptors 0, 1, and 2 must be
opened
before calling the Qp2RunPase API to run a PASE for i program.
Recovery . . . : Either open file descriptors 0, 1, and 2 or change
environment variable QIBM_USE_DESCRIPTOR_STDIO, and then try the request
again.
As an Amazon Associate we earn from qualifying purchases.