Invocar a AS400 RPG desde Java
Tengo un conocimiento muy limitado (0) sobre AS400 y RPG. Pero tenemos un requisito urgente donde necesitamos invocar un programa RPG desde una clase java. Así que encontré que podemos lograrlo a través de JTOpen. Pero estoy atascado en declarar la lista de parámetros del programa. Tengo la siguiente información sobre el programa RPG
Nombre del programa: ZM30000R Parámetros: Sucursal 7,0 (Numérico)
Tipo de cuenta 2 (01-check, 02 ahorros)
Número de cuenta 20 (personaje)
Código de error 7 (carácter) DR / CR indicater 1 (carácter D, C)
Pero no hay idea de qué es la entrada y la salida. Cómo declarar el parámetro de programa. He hecho lo siguiente. Tampoco puedo realizar pruebas porque no tengo conectividad con estos sistemas.
// Create AS400 Text objects for the different lengths
// of parameters you are sending in.
AS400Text branchTxt = new AS400Text(7);
AS400Text accntTypeTxt = new AS400Text(2);
AS400Text accntNumberTxt = new AS400Text(20);
AS400Text errorCodeTxt = new AS400Text(7);
AS400Text DCIndicatorTxt = new AS400Text(1);
// declare and instantiate your parameter list.
ProgramParameter[] parmList = new ProgramParameter[5];
// assign values to your parameters using the AS400Text class to convert to bytes
// the second parameter is an integer which sets the length of your parameter output
parmList[0] = new ProgramParameter( branchTxt.toBytes(branch),7);
parmList[1] = new ProgramParameter( accntTypeTxt.toBytes(accntTypeTxt),2);
parmList[2] = new ProgramParameter( accntNumberTxt.toBytes(accntNumberTxt),20);
parmList[3] = new ProgramParameter( errorCodeTxt.toBytes(""),7);
parmList[4] = new ProgramParameter( DCIndicatorTxt.toBytes(indicator),5);
Cualquier ayuda será realmente muy útil.
Gracias y saludos,
Srinivas