PROCEDURE activate_dual_state_tasks, actdst (
  status)


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

" PURPOSE:
"   This procedure activates the dual state tasks.
"
" NOTES:
"   Things to do:  Convert the dual state task activation commands to use the SCL command naming
"   convention.
"   Margins have been turned off (set to 0) until all messages can be properly aligned together.  To
"   turn the margins back on replace the 0's with a 2.
*IFEND


  WHEN any_fault DO
    IF NOT rav$event_message.normal THEN
      $system.put_line ' '//$strrep(rav$event_message) o=$response
      rav$event_message.normal=true
    IFEND
    $system.put_line ' '//$strrep(osv$status) o=$response

    local_status=$status(false, 'RA', rae$errors_occurred_warning, 'ACTIVATE_DUAL_STATE_TASKS')
  WHENEND


*copy rav$margin

  "$FORMAT=OFF
  VAR
    ignore_status: status
    local_status: status
    rav$event_message: (XDCL) status
  VAREND
  "$FORMAT=ON"

  rap$display_message mm=initiation_messages mn=activating_dual_state_tasks m=rav$margin t=$response ..
        status=ignore_status
  rav$margin=rav$margin + 0

  remote_host_output
  remote_host_input
  interactive_executive

  rav$margin=rav$margin - 0

  IF local_status.normal THEN
    rap$display_message mm=initiation_messages mn=dual_state_tasks_activated m=rav$margin t=$response ..
          status=ignore_status
  IFEND

  EXIT procedure WITH local_status WHEN NOT local_status.normal

PROCEND activate_dual_state_tasks
