Previous Topic: GET ASYNC RESPONSENext Topic: Request Identifier (IDENTIFIED BY:)


Syntax

+--GET ASYNC RESPONSE target_pstep (Procedure Step)
| WHICH EXPORTS:...(syntax the same as USE PStep)
| IDENTIFIED BY: viewname async_request
+--WHEN successful
+--WHEN pending
+--WHEN invalid ASYNC_REQUEST_ID
+--WHEN server error
+--WHEN communications error

When an application uses asynchronous processing, it is the responsibility of the application to obtain the response of the target PStep. The GET ASYNC RESPONSE statement allows the application to request a response. As with a synchronous USE PStep statement, the data must be mapped into export views so that the application can make use of the response data.

The behavior of the GET ASYNC RESPONSE may be modified, depending on whether the WHEN Pending clause is present on the statement.

Note: Depending on the logic of the application, it may be more efficient to use the CHECK ASYNC RESPONSE statement, followed by the GET ASYNC RESPONSE statement. The check statement is simply a status check, and does not incur any of the resource overheads associated with the get response statement (for example, storage for the response message object). However, this processing may be offset by the increased processing time used if the application loops, repeating a check statement.