The OPCACOMP Command

This command, which is described in more detail in OPCACOMP, updates the TWS control information and posts the result of the request back to TWS.

In particular, OPCACOMP first checks if the timer flag is set. If so, it will terminate at once. If not, it will

  1. Set the completion flag in the TWS control information of the subsystem that it is called for.
  2. Actualize further fields of the TWS control information.
  3. Post the result of the request back to TWS.

The main difference between OPCACOMP and the standard modules (EVJESPSC and EVJESTPE) is that OPCACOMP does not check if the current status of the subsystem is in agreement with the expected result. Rather, it requires the (positive or negative) result of the request as one of its input parameters, and usually simply forwards this result to TWS. Thus, a user-written module must itself decide whether or not the request was executed successfully. It can then pass that information to OPCACOMP in order that the request be completed in an orderly manner.

One of the input parameters for OPCACOMP is the sequence number of the current request (see OPCACOMP). TWS Automation provides this and other information in some task global variables. Note, however, that it will do this only when you have specified a timer module in the OPCAPARM entry. You can specify a user-written timer module or the EVJESPTE standard module in the OPCAPARM entry. The following section describes the information contained in the global variables.