timeouts

You should use timeouts with FEPI commands. If there is a problem with the connection to the back-end application, a program without timeouts may wait for ever, you may stop other applications running, and operator intervention may be needed.

timeouts can be used with FEPI ALLOCATE, RECEIVE, START, and CONVERSE commands. In all cases, the timing applies only to the period that FEPI waits for a reply from the back-end system. As soon as anything is received from the back-end, FEPI stops the timer, and then waits for as long as is necessary to receive all the data that is required to complete the command. You cannot specify a timeout for FEPI SEND, because the command always completes immediately, without waiting for any data to be transmitted. Any delay or other problem is handled by the following FEPI RECEIVE command. The action to take on a timeout depends on the command that was used:
  • For FEPI ALLOCATE, you could retry the initial command and then retry using a different pool or target before going into your error-handling routine.
  • For FEPI RECEIVE, you can retry the command and, if that fails, handle the error as if the session with the back-end application had been lost.
  • For FEPI START, the timeout is reported to the started task, and not as an error on the command. In other respects, however, it is the same as a FEPI RECEIVE timeout.
  • For FEPI CONVERSE with a previously allocated conversation, it is exactly as if a FEPI SEND command and then a FEPI RECEIVE command were issued. That is, the timeout that you specify applies only to the ‘receive’ part of the command, and is treated and handled just like that for a FEPI RECEIVE.

    For a temporary conversation, it is as if the command were preceded by a FEPI ALLOCATE and followed by a FEPI FREE, so in this case the timeout is applied to both the ‘allocate’ and ‘receive’ parts of the command. In this situation, if a timeout occurs, there is no indication as to which part caused it.