Avoiding hung application programs and terminals with asynchronous callout requests
Generally, terminals do not implement any timeout mechanisms and if a response is not returned to the terminal, the terminal hangs.
A callout request could result in a hung terminal in at least two possible cases: the application program issuing a callout request terminates without responding to the terminal or a response-mode transaction performs a program-to-program switch without adequate correlation of the response to either the callout request or the inputting terminal.
The first case might occur if, for example, a terminal waits for a response after submitting a transaction that initiates a callout request, and the IMS application program processing that transaction terminates after inserting the callout request to the ALTPCB, the terminal might hang waiting for a response. To avoid this, IMS application programs that issue a callout request should be modified to send an acknowledgment to the inputting terminal.
In the second case, a terminal might hang in the following scenario: an application program, PGMA, processes a response-mode transaction that waits for a response after initiating a program-to-program switch to application program, PGMB, which in turn issues a callout request that generates a response to IMS. Then, if a third application program, PGMC, processes the response, but does not notify PGMA, PGMA hangs waiting for a response. To avoid this, PGMA should be modified to support the correlation of the response through PGMB and PGMC, so that PGMC can pass the response to PGMA for return to the initiating client terminal. If a callout request will not generate a response, response-mode transactions should not be used with applications program such as PGMA.