PROC rap$define_scfs (
  application_name, an: name
  status)


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

"   This request defines SCFS.
*IFEND


    create_variable command_file k=string v='$local.'//$unique
    create_variable ignore_status k=status
    create_variable local_status k=status


  application_name = 'osa$status_control_fac_server'

  IF $specified(application_name) THEN
    application_name = $string($value(application_name))
    IF (application_name = 'OSA$STATUS_CONTROL_FAC_SERVER') OR ..
          (application_name = 'STATION_CONTROLLER_1') OR ..
          (application_name = 'SCF_SERVER') THEN
      EXIT_PROC WITH $status(false, 'RA', rae$defaults_specified, 'APPLICATION_NAME')
    IFEND
  IFEND

  collect_text $fname(command_file) until='  collect_end' sm='?'
    $system.osf$command_library.manage_network_applications
      define_server server=?application_name? protocol=cdna_session nam_initiated=false
        change_connection_priority connection_priority=5
        change_maximum_connections mc=100
        change_accept_connection ac=false
        change_server_validation sp=true
        add_server_managed_titles tp='SCF[AS]$*'
        add_client_address si=nosve ai=2002
        add_client_address si=nosve ai=2003
        add_client_address si=nosve ai=2004
        add_client_address si=nosve ai=2005
        add_client_address si=cdcnet ai=all
      end_define_server
      activate_server server=?application_name?
    quit
  collect_end

  include_file $fname(command_file) status=local_status
  detach_file $fname(command_file) status=ignore_status

  IF local_status.normal THEN
    put_line ' SCFS application is defined' o=$response
  IFEND

  EXIT_PROC WITH local_status

PROCEND rap$define_scfs
