*copyc osd$default_pragmats
MODULE rfm$application_management;
?? TITLE := 'RHFAM_APPLICATION_MANAGEMENT' ??
?? NEWTITLE := '  RING BRACKETS 23D' ??
?? NEWTITLE := '    XREF procedures', EJECT ??
*copyc amp$return
*copyc fsp$copy_file
*copyc osp$set_status_abnormal
*copyc pfp$define
*copyc pfp$define_catalog
*copyc pfp$purge
*copyc pmp$generate_unique_name
*copyc pmp$ready_task
*copyc rfp$lock_table
*copyc rfp$unlock_table
?? TITLE := '    INLINE procedures', EJECT ??
*copyc rfp$find_client_entry
*copyc rfp$verify_caller_capability
*copyc syp$cycle
?? NEWTITLE := '      find_server_entry', EJECT ??
  PROCEDURE [INLINE] find_server_entry (server_name: rft$application_name;
    VAR server_entry_p: ^rft$rhfam_server_table_entry);

{
{           The purpose of this procedure is to locate the specified
{     server table entry and return a pointer to the entry.
{     The caller of this routine must have the server table locked.
{
{     SERVER_NAME: (input) This parameter specifies the server to
{       locate.
{
{     SERVER_ENTRY_P: (output) This parameter returns the pointer to the
{       specified server table entry. A NIL pointer indicates no server
{       table entry was found.
{

    server_entry_p := rfv$rhfam_server_table.first_entry;
    WHILE server_entry_p <> NIL DO
      IF (server_entry_p^.server_name = server_name) THEN
        RETURN;
      IFEND;
      server_entry_p := server_entry_p^.next_entry;
    WHILEND;

  PROCEND find_server_entry;
?? OLDTITLE, EJECT ??
?? OLDTITLE, EJECT ??
?? TITLE := '    TYPE/CONST Definitions', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc rfe$condition_codes
?? POP ??
*copyc nav$network_paged_heap
*copyc rfv$status_table
*copyc rfv$rhfam_client_table
*copyc rfv$rhfam_server_table
*copyc rfv$system_task_id
*copyc tmv$null_global_task_id
?? TITLE := '    rfp$activate_rhfam_client', EJECT ??
  PROCEDURE [XDCL, #GATE] rfp$activate_rhfam_client (client: rft$application_name;
    VAR status: ost$status);

*copy rfh$activate_rhfam_client_r3

    VAR
      abort_connections: BOOLEAN,
      client_entry_p: ^rft$rhfam_client_table_entry,
      capabilities: ARRAY[1..1] OF ost$name,
      local_status: ost$status;

    status.normal := TRUE;

    capabilities [1] := avc$network_applic_management;

    rfp$verify_caller_capability (^capabilities, 'ACTIVATE_RHFAM_CLIENT', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  /wait_for_abort_connections/
    REPEAT
      rfp$lock_table (rfv$rhfam_client_table.lock);
      rfp$find_client_entry (client, FALSE, client_entry_p, local_status);
      IF NOT local_status.normal THEN
        osp$set_status_abnormal (rfc$product_id, rfe$appl_not_defined, client, status);
        EXIT /wait_for_abort_connections/;
      IFEND;
      IF client_entry_p^.client_active THEN
        osp$set_status_abnormal (rfc$product_id, rfe$appl_already_active, client, status);
        EXIT /wait_for_abort_connections/;
      IFEND;
      abort_connections := client_entry_p^.abort_connections;
      IF abort_connections AND rfv$status_table.system_task_is_up THEN
        rfp$unlock_table (rfv$rhfam_client_table.lock);
        syp$cycle;
      ELSE
        client_entry_p^.abort_connections := FALSE;
        abort_connections := FALSE;
      IFEND;
    UNTIL NOT abort_connections;

    IF status.normal THEN
      client_entry_p^.client_active := TRUE;
    IFEND;

    rfp$unlock_table (rfv$rhfam_client_table.lock);

  PROCEND rfp$activate_rhfam_client;
?? TITLE := '    rfp$activate_rhfam_server', EJECT ??
  PROCEDURE [XDCL, #GATE] rfp$activate_rhfam_server (server: rft$application_name;
    VAR status: ost$status);

*copy rfh$activate_rhfam_server_r3

    VAR
      abort_connections: BOOLEAN,
      server_entry_p: ^rft$rhfam_server_table_entry,
      capabilities: ARRAY[1..1] OF ost$name;

    status.normal := TRUE;

    capabilities [1] := avc$network_applic_management;

    rfp$verify_caller_capability (^capabilities, 'ACTIVATE_RHFAM_SERVER', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  /wait_for_abort_connections/
    REPEAT
      rfp$lock_table (rfv$rhfam_server_table.lock);
      find_server_entry (server, server_entry_p);
      IF server_entry_p = NIL THEN
        osp$set_status_abnormal (rfc$product_id, rfe$appl_not_defined, server, status);
        EXIT /wait_for_abort_connections/;
      IFEND;
      IF server_entry_p^.server_active THEN
        osp$set_status_abnormal (rfc$product_id, rfe$appl_already_active, server, status);
        EXIT /wait_for_abort_connections/;
      IFEND;
      abort_connections := server_entry_p^.abort_connections;
      IF abort_connections AND rfv$status_table.system_task_is_up THEN
        rfp$unlock_table (rfv$rhfam_server_table.lock);
        syp$cycle;
      ELSE
        server_entry_p^.abort_connections := FALSE;
        abort_connections := FALSE;
      IFEND;
    UNTIL NOT abort_connections;

    IF status.normal THEN
      server_entry_p^.server_active := TRUE;
    IFEND;

    rfp$unlock_table (rfv$rhfam_server_table.lock);

  PROCEND rfp$activate_rhfam_server;
?? TITLE := '    rfp$deactivate_rhfam_client', EJECT ??
  PROCEDURE [XDCL, #GATE] rfp$deactivate_rhfam_client (client: rft$application_name;
    terminate_active_connections: boolean;
    VAR status: ost$status);

*copy rfh$deactivate_rhfam_client_r3

    VAR
      ignore_status: ost$status,
      task_id: ost$global_task_id,
      client_entry_p: ^rft$rhfam_client_table_entry,
      capabilities: ARRAY[1..1] OF ost$name,
      local_status: ost$status;

    status.normal := TRUE;

    capabilities [1] := avc$network_applic_management;

    rfp$verify_caller_capability (^capabilities, 'DEACTIVATE_RHFAM_CLIENT', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    task_id := tmv$null_global_task_id;

    rfp$lock_table (rfv$rhfam_client_table.lock);

  /deactivate_client/
    BEGIN
      rfp$find_client_entry (client, FALSE, client_entry_p, local_status);
      IF NOT local_status.normal THEN
        osp$set_status_abnormal (rfc$product_id, rfe$appl_not_defined, client, status);
        EXIT /deactivate_client/;
      IFEND;
      IF NOT client_entry_p^.client_active THEN
        osp$set_status_abnormal (rfc$product_id, rfe$appl_already_inactive, client, status);
        EXIT /deactivate_client/;
      IFEND;
      client_entry_p^.client_active := FALSE;
      IF terminate_active_connections AND (client_entry_p^.current_connections <> 0) AND
        rfv$status_table.system_task_is_up THEN
        client_entry_p^.abort_connections := TRUE;
        task_id := rfv$system_task_id;
      IFEND;
    END /deactivate_client/;

    rfp$unlock_table (rfv$rhfam_client_table.lock);

    IF (task_id = rfv$system_task_id) AND (task_id <> tmv$null_global_task_id) THEN
      pmp$ready_task (task_id, ignore_status);
    IFEND;

  PROCEND rfp$deactivate_rhfam_client;
?? TITLE := '    rfp$deactivate_rhfam_server', EJECT ??
  PROCEDURE [XDCL, #GATE] rfp$deactivate_rhfam_server (server: rft$application_name;
    terminate_active_connections: boolean;
    VAR status: ost$status);

*copy rfh$deactivate_rhfam_server_r3

    VAR
      active_incoming_connects: BOOLEAN,
      ignore_status: ost$status,
      task_id: ost$global_task_id,
      server_entry_p: ^rft$rhfam_server_table_entry,
      capabilities: ARRAY[1..1] OF ost$name;

    status.normal := TRUE;

    capabilities [1] := avc$network_applic_management;

    rfp$verify_caller_capability (^capabilities, 'DEACTIVATE_RHFAM_SERVER', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    task_id := tmv$null_global_task_id;

  /wait_for_active_incoming/
    REPEAT
      rfp$lock_table (rfv$rhfam_server_table.lock);
      find_server_entry (server, server_entry_p);
      IF server_entry_p = NIL THEN
        osp$set_status_abnormal (rfc$product_id, rfe$appl_not_defined, server, status);
        EXIT /wait_for_active_incoming/;
      IFEND;
      IF NOT server_entry_p^.server_active THEN
        osp$set_status_abnormal (rfc$product_id, rfe$appl_already_inactive, server, status);
        EXIT /wait_for_active_incoming/;
      IFEND;
      active_incoming_connects := (server_entry_p^.active_incoming_connects <> 0);
      IF active_incoming_connects THEN
        rfp$unlock_table (rfv$rhfam_server_table.lock);
        syp$cycle;
      ELSE
        server_entry_p^.server_active := FALSE;
        IF terminate_active_connections AND (server_entry_p^.current_connections <> 0) AND
          rfv$status_table.system_task_is_up THEN
          server_entry_p^.abort_connections := TRUE;
          task_id := rfv$system_task_id;
        IFEND;
      IFEND;
    UNTIL NOT active_incoming_connects;

    rfp$unlock_table (rfv$rhfam_server_table.lock);

    IF (task_id = rfv$system_task_id) AND (task_id <> tmv$null_global_task_id) THEN
      pmp$ready_task (task_id, ignore_status);
    IFEND;

  PROCEND rfp$deactivate_rhfam_server;
?? TITLE := '    rfp$define_rhfam_client', EJECT ??
  PROCEDURE [XDCL, #GATE] rfp$define_rhfam_client (client: rft$application_name;
    maximum_connections: rft$application_connections;
    capability: ost$name;
    ring: ost$ring;
    system_privilege: boolean;
    system_wide_connection_mgmt: boolean;
    VAR status: ost$status);

*copy rfh$define_rhfam_client_r3

    VAR
      client_entry_p: ^rft$rhfam_client_table_entry,
      new_client_entry_p: ^rft$rhfam_client_table_entry,
      server_entry_p: ^rft$rhfam_server_table_entry,
      capabilities: ARRAY[1..1] OF ost$name,
      local_status: ost$status;

    status.normal := TRUE;

    capabilities [1] := avc$network_applic_management;

    rfp$verify_caller_capability (^capabilities, 'DEFINE_RHFAM_CLIENT', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    ALLOCATE new_client_entry_p IN nav$network_paged_heap^;

    new_client_entry_p^.next_entry := NIL;
    new_client_entry_p^.client_active := FALSE;
    new_client_entry_p^.client_name := client;
    new_client_entry_p^.maximum_connections := maximum_connections;
    new_client_entry_p^.current_connections := 0;
    new_client_entry_p^.client_capability := capability;
    new_client_entry_p^.client_ring := ring;
    new_client_entry_p^.client_system_privilege := system_privilege;
    new_client_entry_p^.system_wide_connection_mgmt := system_wide_connection_mgmt;
    new_client_entry_p^.connections_reserved := 0;
    new_client_entry_p^.abort_connections := FALSE;

{ Server table is locked first to avoid deadlock with DEFINE_SERVER command.

    rfp$lock_table (rfv$rhfam_server_table.lock);
    rfp$lock_table (rfv$rhfam_client_table.lock);

  /define_client/
    BEGIN

      rfp$find_client_entry (client, FALSE, client_entry_p, local_status);
      IF local_status.normal THEN
        osp$set_status_abnormal (rfc$product_id, rfe$duplicate_appl_definition, client, status);
        EXIT /define_client/;
      IFEND;

      find_server_entry (client, server_entry_p);
      IF server_entry_p <> NIL THEN
        osp$set_status_abnormal (rfc$product_id, rfe$client_defined_as_server, client, status);
        EXIT /define_client/;
      IFEND;
      new_client_entry_p^.next_entry := rfv$rhfam_client_table.first_entry;
      rfv$rhfam_client_table.first_entry := new_client_entry_p;

    END /define_client/;

    rfp$unlock_table (rfv$rhfam_client_table.lock);
    rfp$unlock_table (rfv$rhfam_server_table.lock);

    IF NOT status.normal THEN
      FREE new_client_entry_p IN nav$network_paged_heap^;
    IFEND;


  PROCEND rfp$define_rhfam_client;
?? TITLE := '    rfp$define_rhfam_server', EJECT ??
  PROCEDURE [XDCL, #GATE] rfp$define_rhfam_server (server: rft$application_name;
    rhfam_initiated: boolean;
    maximum_connections: rft$application_connections;
    capability: ost$name;
    ring: ost$ring;
    system_privilege: boolean;
    server_job: amt$local_file_name;
    server_job_max_connections: rft$application_connections;
    accept_connection: boolean;
    rhfam_validates_connection_lid: boolean;
    VAR status: ost$status);

*copy rfh$define_rhfam_server_r3

    VAR
      client_entry_p: ^rft$rhfam_client_table_entry,
      new_server_entry_p: ^rft$rhfam_server_table_entry,
      server_entry_p: ^rft$rhfam_server_table_entry,
      capabilities: ARRAY[1..1] OF ost$name,
      local_status: ost$status;

    status.normal := TRUE;

    capabilities [1] := avc$network_applic_management;

    rfp$verify_caller_capability (^capabilities, 'DEFINE_RHFAM_SERVER', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    ALLOCATE new_server_entry_p IN nav$network_paged_heap^;

    new_server_entry_p^.next_entry := NIL;
    new_server_entry_p^.server_active := FALSE;
    new_server_entry_p^.server_name := server;
    new_server_entry_p^.maximum_connections := maximum_connections;
    new_server_entry_p^.server_capability := capability;
    new_server_entry_p^.server_ring := ring;
    new_server_entry_p^.server_system_privilege := system_privilege;
    new_server_entry_p^.current_connections := 0;
    new_server_entry_p^.connections_reserved := 0;
    new_server_entry_p^.partner_job_connections := 0;
    new_server_entry_p^.access_method_accept := accept_connection;
    new_server_entry_p^.validate_connection_lid := rhfam_validates_connection_lid;
    new_server_entry_p^.active_incoming_connects := 0;
    new_server_entry_p^.abort_connections := FALSE;
    new_server_entry_p^.incoming_connect := NIL;
    new_server_entry_p^.server_identifier := NIL;
    new_server_entry_p^.rhfam_initiated_server := rhfam_initiated;
    IF rhfam_initiated THEN
      new_server_entry_p^.server_job_max_connections := server_job_max_connections;
    IFEND;

{ Server table is locked first to avoid deadlock with DEFINE_CLIENT command.

    rfp$lock_table (rfv$rhfam_server_table.lock);
    rfp$lock_table (rfv$rhfam_client_table.lock);

  /define_server/
    BEGIN

      find_server_entry (server, server_entry_p);
      IF server_entry_p <> NIL THEN
        osp$set_status_abnormal (rfc$product_id, rfe$duplicate_appl_definition, server, status);
        EXIT /define_server/;
      IFEND;

      rfp$find_client_entry (server, FALSE, client_entry_p, local_status);
      IF local_status.normal THEN
        osp$set_status_abnormal (rfc$product_id, rfe$server_defined_as_client, server, status);
        EXIT /define_server/;
      IFEND;

      IF rhfam_initiated THEN
        create_server_job_file (server_job, server, status);
        IF NOT status.normal THEN
          EXIT /define_server/;
        IFEND;
      IFEND;

      new_server_entry_p^.next_entry := rfv$rhfam_server_table.first_entry;
      rfv$rhfam_server_table.first_entry := new_server_entry_p;

    END /define_server/;

    rfp$unlock_table (rfv$rhfam_client_table.lock);
    rfp$unlock_table (rfv$rhfam_server_table.lock);

    IF NOT status.normal THEN
      FREE new_server_entry_p IN nav$network_paged_heap^;
    IFEND;

  PROCEND rfp$define_rhfam_server;
?? TITLE := '    rfp$delete_rhfam_client', EJECT ??
  PROCEDURE [XDCL, #GATE] rfp$delete_rhfam_client (client: rft$application_name;
    VAR status: ost$status);

*copy rfh$delete_rhfam_client_r3

    VAR
      client_entry_p: ^rft$rhfam_client_table_entry,
      current_entry_p: ^rft$rhfam_client_table_entry,
      previous_entry_p: ^rft$rhfam_client_table_entry,
      capabilities: ARRAY[1..1] OF ost$name,
      local_status: ost$status;

    status.normal := TRUE;

    capabilities [1] := avc$network_applic_management;

    rfp$verify_caller_capability (^capabilities, 'DELETE_RHFAM_CLIENT', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  /delete_client/
    BEGIN

      rfp$lock_table (rfv$rhfam_client_table.lock);

      rfp$find_client_entry (client, FALSE, client_entry_p, local_status);
      IF NOT local_status.normal THEN
        osp$set_status_abnormal (rfc$product_id, rfe$appl_not_defined, client, status);
        EXIT /delete_client/;
      IFEND;
      IF client_entry_p^.client_active THEN
        osp$set_status_abnormal (rfc$product_id, rfe$appl_not_inactive, client, status);
        EXIT /delete_client/;
      IFEND;
      IF client_entry_p^.connections_reserved <> 0 THEN
        osp$set_status_abnormal (rfc$product_id, rfe$appl_job_signed_on, client, status);
        EXIT /delete_client/;
      IFEND;

      current_entry_p := rfv$rhfam_client_table.first_entry;
      previous_entry_p := NIL;
    /delete_client_table_entry/
      WHILE current_entry_p <> NIL DO
        IF current_entry_p^.client_name = client_entry_p^.client_name THEN
          IF previous_entry_p = NIL THEN
            rfv$rhfam_client_table.first_entry := client_entry_p^.next_entry;
          ELSE
            previous_entry_p^.next_entry := client_entry_p^.next_entry;
          IFEND;
          EXIT /delete_client_table_entry/;
        IFEND;
        previous_entry_p := current_entry_p;
        current_entry_p := current_entry_p^.next_entry;
      WHILEND /delete_client_table_entry/;

    END /delete_client/;

    rfp$unlock_table (rfv$rhfam_client_table.lock);

    IF status.normal AND (client_entry_p <> NIL) THEN
      FREE client_entry_p IN nav$network_paged_heap^;
    IFEND;

  PROCEND rfp$delete_rhfam_client;
?? TITLE := '    rfp$delete_rhfam_server', EJECT ??
  PROCEDURE [XDCL, #GATE] rfp$delete_rhfam_server (server: rft$application_name;
    VAR status: ost$status);

*copy rfh$delete_rhfam_server_r3

    VAR
      cycle_selector: pft$cycle_selector,
      password: pft$name,
      file_path: ^pft$path,
      server_entry_p: ^rft$rhfam_server_table_entry,
      current_entry_p: ^rft$rhfam_server_table_entry,
      previous_entry_p: ^rft$rhfam_server_table_entry,
      capabilities: ARRAY[1..1] OF ost$name;

    status.normal := TRUE;

    capabilities [1] := avc$network_applic_management;

    rfp$verify_caller_capability (^capabilities, 'DELETE_RHFAM_SERVER', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  /delete_server/
    BEGIN

      rfp$lock_table (rfv$rhfam_server_table.lock);

      find_server_entry (server, server_entry_p);
      IF server_entry_p = NIL THEN
        osp$set_status_abnormal (rfc$product_id, rfe$appl_not_defined, server, status);
        EXIT /delete_server/;
      IFEND;
      IF server_entry_p^.server_active THEN
        osp$set_status_abnormal (rfc$product_id, rfe$appl_not_inactive, server, status);
        EXIT /delete_server/;
      IFEND;
      IF server_entry_p^.connections_reserved <> 0 THEN
        osp$set_status_abnormal (rfc$product_id, rfe$appl_job_signed_on, server, status);
        EXIT /delete_server/;
      IFEND;

      IF server_entry_p^.rhfam_initiated_server THEN
        PUSH file_path: [1 .. 5];
        file_path^ [1] := rfc$rhfam_family_name;
        file_path^ [2] := rfc$rhfam_master_catalog;
        file_path^ [3] := rfc$rhfam_sub_catalog;
        file_path^ [4] := rfc$server_sub_catalog;
        file_path^ [5] := server;
        password := rfc$password;
        cycle_selector.cycle_option := pfc$highest_cycle;
        pfp$purge (file_path^, cycle_selector, password, status);
      IFEND;

      current_entry_p := rfv$rhfam_server_table.first_entry;
      previous_entry_p := NIL;
    /delete_server_table_entry/
      WHILE current_entry_p <> NIL DO
        IF current_entry_p^.server_name = server_entry_p^.server_name THEN
          IF previous_entry_p = NIL THEN
            rfv$rhfam_server_table.first_entry := server_entry_p^.next_entry;
          ELSE
            previous_entry_p^.next_entry := server_entry_p^.next_entry;
          IFEND;
          FREE server_entry_p IN nav$network_paged_heap^;
          EXIT /delete_server_table_entry/;
        IFEND;
        previous_entry_p := current_entry_p;
        current_entry_p := current_entry_p^.next_entry;
      WHILEND /delete_server_table_entry/;

    END /delete_server/;

    rfp$unlock_table (rfv$rhfam_server_table.lock);

    IF status.normal AND (server_entry_p <> NIL) THEN
      FREE server_entry_p IN nav$network_paged_heap^;
    IFEND;

  PROCEND rfp$delete_rhfam_server;
?? TITLE := '    Utility Subroutines', EJECT ??
?? NEWTITLE := '      create_server_job_file', EJECT ??
  PROCEDURE create_server_job_file (server_job: amt$local_file_name;
        application_name: rft$application_name;
    VAR status: ost$status);

{
{     The purpose of this procedure is to create the file that contains
{     the server job image.  If the server_job subcatalog does not exist
{     it will be created.  If the file already exists it will be purged
{     and redefined. This file is used by RHFAM/VE to get the job image
{     for an auto started server application. If this routine is executed
{     under a user number other than the rfc$rhfam_master_catalog the
{     subcatalog rfc$rhfam_sub_catalog must have been previously created.
{
{     SERVER_JOB: (input) This parameter specifies the server job definition
{       file to copy to the system catalog.
{
{     APPLICATION_NAME: (input) This parameter specifies the file name to
{       create in the $system.rhfam catalog.
{
{     STATUS: (output) A value of normal is returned if the server job file
{       was successfully copied to the $system catalog.
{

    VAR
      file_attributes: ^fst$file_cycle_attributes,
      ignore_status: ost$status,
      unique_name: ost$unique_name,
      cycle_selector: pft$cycle_selector,
      password: pft$name,
      catalog_path: ^pft$path,
      file_path: ^pft$path;

    status.normal := TRUE;

    PUSH catalog_path: [1 .. 4];
    catalog_path^ [1] := rfc$rhfam_family_name;
    catalog_path^ [2] := rfc$rhfam_master_catalog;
    catalog_path^ [3] := rfc$rhfam_sub_catalog;
    catalog_path^ [4] := rfc$server_sub_catalog;
    pfp$define_catalog (catalog_path^, status);
    IF (status.normal) OR
       (status.condition = pfe$name_already_subcatalog) OR
       (status.condition = pfe$not_master_catalog_owner) THEN
      PUSH file_path: [1 .. 5];
      file_path^ [1] := rfc$rhfam_family_name;
      file_path^ [2] := rfc$rhfam_master_catalog;
      file_path^ [3] := rfc$rhfam_sub_catalog;
      file_path^ [4] := rfc$server_sub_catalog;
      file_path^ [5] := application_name;
      password := rfc$password;
      cycle_selector.cycle_option := pfc$highest_cycle;
      pfp$purge (file_path^, cycle_selector, password, status);
      IF status.normal OR (status.condition = pfe$unknown_permanent_file) THEN
        pmp$generate_unique_name (unique_name, ignore_status);
        pfp$define (unique_name.value, file_path^, cycle_selector, password,
              pfc$maximum_retention, pfc$no_log, status);
        IF status.normal THEN
          PUSH file_attributes: [1..1];
          file_attributes^[1].selector := fsc$ring_attributes;
          file_attributes^[1].ring_attributes.r1 := osc$tsrv_ring;
          file_attributes^[1].ring_attributes.r2 := osc$user_ring_2;
          file_attributes^[1].ring_attributes.r3 := osc$user_ring_2;
          fsp$copy_file (server_job, unique_name.value, NIL, NIL, file_attributes, status);
          amp$return (unique_name.value, ignore_status);
        IFEND;
      IFEND;
    IFEND;

  PROCEND create_server_job_file;
?? OLDTITLE ??
?? OLDTITLE ??
MODEND rfm$application_management;
