Created On:  11 August 2012


How do I change the timeout for a COBOL Web Service client?


There are two timeout options, one for establishing the connection and another for other operations. The defaults can be overridden by setting the following environment variables:

or editing mf-client.dat:

[defaults] connect-timeout=15 timeout=30

These timeouts are set in seconds, but with a 5-second grain, so in effect they are rounded up to the next multiple of 5 seconds. Timeouts are set as follows:

If the application calls MccSetTimeout / MccSetConnectTimeout on a context, that context will use the specified timeout values.

Otherwise, if MFC_TIMEOUT / MFC_CONNECT_TIMEOUT is set in the environment, its value will be used.

Otherwise, if a "[defaults]" section exists in mf-client.dat and it contains an entry for "timeout" / "connect-timeout", that value will be used.

Otherwise, the built-in defaults of 15s for connect timeout and 30s for other functions will be used.