Highlighted
Trusted Contributor.
Trusted Contributor.
244 views

Name is not unique (RTS119) calling when calling webservice twice

Jump to solution

I am using VC40 and try to call a cobol programm named PROGRAM1 within a Soap-Webservice using Wildfly 10:

@WebService
public class SoapDemo {

@WebMethod
public Integer doLvdcWith1(boolean print) {

PROGRAM1 program1 = new PROGRAM1();
Copy1 copy1 = new Copy1();

copy1.setEDatum("20190101");
program1.PROGRAM1(copy1);

System.err.println(copy1.getADatum());

return 1;
}
}

Calling the webservice the first time, everything is perfect.

But calling it another time, the call doesn't work:

com.microfocus.cobol.program.COBOLRuntimeException: 119 Name is not unique [de.herbert.PROGRAM1]

I think I found a reason for the crash, but unfortunately no solution:

https://community.microfocus.com/t5/Net-Express-Server-Express/RTS-119-Name-is-not-unique/ta-p/1751427

0 Likes
1 Solution

Accepted Solutions
Highlighted
Trusted Contributor.
Trusted Contributor.

I found the solution, I have to use the Rununit ...

try
{
Copy1 copy1 = new Copy1();
copy1.setEDatum("20190101");
PROGRAM1 programInstance = new PROGRAM1();
myRunUnit.addInstance(programInstance);
programInstance.PROGRAM1(copy1);
System.err.println(copy1.getADatum());
}
finally
{
// Destroy the run unit
myRunUnit.stopRunUnit();
}

View solution in original post

1 Reply
Highlighted
Trusted Contributor.
Trusted Contributor.

I found the solution, I have to use the Rununit ...

try
{
Copy1 copy1 = new Copy1();
copy1.setEDatum("20190101");
PROGRAM1 programInstance = new PROGRAM1();
myRunUnit.addInstance(programInstance);
programInstance.PROGRAM1(copy1);
System.err.println(copy1.getADatum());
}
finally
{
// Destroy the run unit
myRunUnit.stopRunUnit();
}

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.