ContentsIndexPreviousNext

2.3.2 CALLing C$ASYNCPOLL

To check the status of the server program while the client is running, you can CALL the C$ASYNCPOLL routine. The syntax for this CALL is:

CALL "C$ASYNCPOLL" using handle-of-call state-of-call parameter-1 parameter-2.

where:

handle-of-call is the handle of the CALL previously run with C$ASYNCRUN

state-of-call is a PIC s(9) with value "0" if the run is not yet completed, or "1" if the run is completed

parameter is the parameter of the CALL returned when state-of-call is "1"

For example:

CALL "C$ASYNCPOLL" using h-call-prog2 state-of-call customer-info.

Note that any parameters given in C$ASYNCPOLL must match the parameters given in C$ACYNCRUN. C$ASYNCPOLL tells AcuConnect to query the server about the status of the remote application. AcuConnect returns a status that you can DISPLAY on the client. If the status is "1" (CALL completed), C$ASYNCPOLL terminates the connection with the remote application.