Proper functioning of C RPC Server

I am not getting the expected behavior from my C EntireX RPC server. Each call seems to respond as if it were a new job step. I have a C dll in a batch pdse load library. This C dll has one function that responds with different data based on input parameters. I used EntireX in eclipse to create a C RPC server stub program. I added calls to my C dll to this stub and compilded and linked it. It is in a pdse load library. The server code is running on an IBM mainframe and is accessed through an EntireX Broker.

When I link the C dll into a regular batch application, it opens files and loads other data dlls once - the first time it is called. They remain open or in storage until the application step ends. I have “write to operator (wto) messages” which confirm this.

My problem is that the EntireX RPC server seems to treat each call as if it were a new job step. When the user makes a call through the broker, the rpc server is called, the function in the dll is accessed and it behaves as if it is a new job step. It opens the required data files (and data dlls) and returns the data. I know this because of the number of wtos. The problem with this is that it is constantly opening and loaded data dlls. Each call to the broker causes the files to be opened again.

Is the the expected behaviour or is there a setting somewhere that I need to set.

My understanding is that the RPC server stub application should link to my C dll and treat each new call as if it were in the same job step and each call would be like repeated calls from a regular batch application. Is this assumption wrong?

Thanks for any help.

Please confirm that the RPC Server runs on z/OS. What is the version of the RPC Server you are using (including the fix level)?

What did you specify in the RPC Server parameters endworkers or workermodel?

We are using version 8.2.2.27.

Minworkers = 1
Maxworkers = 10
Endworkers = Immediately

Thanks.

If you set Endworkers=Immediately then the server stops a thread immediately as soon as it has finished its conversation. For the next call a new thread is started. So the behavior you observed is the consequence of this setting.

You should use the setting Timeout or Never to avoid that the creation of a new thread for each call.

See:
http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite8-2_sp2/EntireX/8-2-SP2_EntireX/adminZos/rpcServerBatch.htm#rpcBatch_setServerParms section “Possible Values for Endworkers”
and
http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite8-2_sp2/EntireX/8-2-SP2_EntireX/adminZos/rpcServerBatch.htm#rpcBatch_scalability

That solved the problem. Thanks a lot.