PROC deactivate_qtf (
  status : var of status = $optional
  )


*IF $variable(rav$proc_doc,declared)<>'UNKNOWN'

"   This request deactivates and deletes the system task for the QTF client application.
*IFEND


  create_variable local_status kind=status

  deactivate_system_task task_name=queue_transfer_client status=local_status
  IF local_status.normal OR ($condition(local_status.condition) =   ..
        'OSE$SYSTEM_TASK_NOT_ACTIVE') THEN
    wait time=2000  "allow time for task to terminate"
    delete_system_task name=queue_transfer_client status=local_status
  IFEND

  EXIT_PROC WITH local_status WHEN NOT local_status.normal

PROCEND deactivate_qtf
