gpt4 book ai didi

java - 错误CEE9001从Java调用外部存储过程(RPGLE/AS400)

转载 作者:行者123 更新时间:2023-11-29 08:45:19 26 4
gpt4 key购买 nike

当我从Java运行存储过程并调用简单的RPGLE程序时出现错误
如果我从DB2(系统I导航器)运行SP成功,或者如果我运行rpgle程序为as400,则返回ok,但是当从Java运行SP时,第一次执行就可以了,第二次执行会返回错误(CEE9901-应用程序错误。* N在语句* IN处不受* N的监视。指令X'4000)
我不知道为什么!
有人可以帮助我吗?

这是我的代码
SP

CREATE PROCEDURE WOOLB3.SP806012 (  
IN TRAMA CHAR(62) ,
INOUT RPTA CHAR(1) ,
INOUT VALOR CHAR(15) )
LANGUAGE RPGLE
SPECIFIC WOOLB3.SP806012
NOT DETERMINISTIC
MODIFIES SQL DATA
CALLED ON NULL INPUT
EXTERNAL NAME 'WOOLB3/IR806012'
PARAMETER STYLE GENERAL ;

GRANT ALTER , EXECUTE
ON SPECIFIC PROCEDURE WOOLB3.SP806012
TO GRPAYP ;

GRANT ALTER , EXECUTE
ON SPECIFIC PROCEDURE WOOLB3.SP806012
TO GRPCAL ;

GRANT ALTER , EXECUTE
ON SPECIFIC PROCEDURE WOOLB3.SP806012
TO PUBLIC ;

GRANT ALTER , EXECUTE
ON SPECIFIC PROCEDURE WOOLB3.SP806012
TO QPGMR ;


爪哇

Connection conn = null;
CallableStatement cs = null;
StringBuffer sbSQL = new StringBuffer();
String valor = "";

try {
log.info("Inicio-->SP806012");
conn = ResourceManager.getConnection(JNDIContext.JNDI_DATASOURCE_MCD);
String esquema = FrameworkParameters.getValue(MCDConstant.ESQUEMA_RPG);
sbSQL.append("{CALL ").append(esquema);
sbSQL.append(".").append(MCDConstant.SP_OBTIENE_VALOR_CUOTA).append("(?,?,?)}");
cs = conn.prepareCall(sbSQL.toString());
System.out.println(trama);
cs.setString(1, trama);
cs.setString(2, MCDConstant.VACIO);
cs.setString(3, MCDConstant.VACIO);
cs.registerOutParameter(2, java.sql.Types.VARCHAR);
cs.registerOutParameter(3, java.sql.Types.VARCHAR);

cs.execute();

if (cs.getString(2).equals(MCDConstant.STRING_UNO)){
valor = (String)cs.getString(3).trim();
}

log.info("Fin-->SP806012");

} catch (SQLException e) {
e.printStackTrace();
throw new DAOException(e.getMessage(), e);
} catch (Exception e) {
e.printStackTrace();
throw new DAOException(e);
} finally{
ResourceManager.callableStatementClose(cs);
cs = null;
ResourceManager.connectionClose(conn);
conn = null;
}
return valor;


角色扮演游戏

            z-add     *zeros        v_cuota          11 2           
z-add *zeros v_mdiferi 1 0
move '0' v_mdiferi 1
move *blanks p_fecvcto 8
eval ds_tarjeta = %trim(p_tarjeta)

k_cs01p chain cs01pr 70
70 eval socic = ''
EXSR sr_ObtRelDif
eval p_fecvcto = fePROXVENC1(ds_tarjeta:v_mdiferi)
eval v_cuota = fegetcuota(p_ncuota:p_fcompra:
p_fecvcto:p_capital:p_tea:socic)

v_cuota ifgt *zeros
movel '1' p_rpta
endif
move v_cuota p_valor

最佳答案

Seríamuyútilque pegarasacáel工作日志大全。 WRKOBJLCK USUARIO_DE_JAVA上的Parabuscar tra trazajo es puedes hacer * USRPRF,travisa tra sajo y siaún没有错误,pegaloacápara ayudarte。 Slds。

关于java - 错误CEE9001从Java调用外部存储过程(RPGLE/AS400),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25729408/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com