Programming your own Completion Routines

If you specify a command in the OPCACMD entry that does not change the status of the subsystem to UP, RUNNING or AUTODOWN, then you cannot use the standard modules for completing the request. In this case, you must perform the update of the TWS control information and the posting of the result to TWS.

You can do that in the command module (specified in the OPCACMD entry) or in a user-written timer module (specified in the OPCAPARM entry) or in both. The user-written timer module is called by TWS Automation in the following format:
MODULE_NAME subsystem_name expected_result TWS_application_ID
            TWS_workstation_ID request_sequence_number

To simplify completion of a user-written module, TWS Automation provides the following facilities.