I´m trying to create a terminal to connect with EPI in CICS Transaction Gateway. My code is below. When the connect() method exectues, an exception is generated.
com.ibm.ctg.epi.EPIRequestException: CTG6799E Código de retorno
EPI_ERR_FAILED de la llamada EPIRequest.addExTerminal at
com.ibm.ctg.epi.Terminal.flowConnect(Unknown Source) at
com.ibm.ctg.epi.Terminal.connect(Unknown Source) at
MainEpi.main(MainEpi.java:32)
The CICS TG server is running on an AIX node, I tried generating the basic terminal and the extended terminal but anyone can connect.
import java.io.IOException;
import com.ibm.ctg.client.EPIRequest;
import com.ibm.ctg.client.JavaGateway;
import com.ibm.ctg.epi.*;
public class MainEpi {
public MainEpi() {
super();
}
public static void main(String[]args) {
try {
EPIGateway epiGate = new EPIGateway("tcp://10.191.104.244", 48620);
Terminal term = new Terminal();
term.setGateway(epiGate);
term.setServerName("CTGDES");
term.connect();
System.out.println("Conexión establecida con la terminal");
epiGate.close();
}catch(EPIException ep) {
ep.printStackTrace();
}catch (IOException e) {
e.printStackTrace();
}
}
}