?? NEWTITLE := 'NOS/VE Basic Access method : File Structure Functions' ??
MODULE bam$file_structure_functions;
?? RIGHT := 110 ??

?? NEWTITLE := 'Global Declarations Referenced By This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc oss$job_paged_literal
*copyc amc$condition_code_limits
*copyc amc$mau_length
*copyc fsc$local
*copyc osd$virtual_address
*copyc ame$access_validation_errors
*copyc ame$attribute_validation_errors
*copyc ame$fap_validation_errors
*copyc ame$improper_access_info_key
*copyc ame$improper_file_id
*copyc ame$ring_validation_errors
*copyc amt$access_information
*copyc amt$access_level
*copyc amt$attribute_source
*copyc amt$average_record_length
*copyc amt$block_type
*copyc amt$collate_table
*copyc amt$collation_value
*copyc amt$data_padding
*copyc amt$error_exit_procedure
*copyc amt$error_limit
*copyc amt$estimated_record_count
*copyc amt$fetch_attributes
*copyc amt$file_access_selections
*copyc amt$file_attribute_keys
*copyc amt$file_attributes
*copyc amt$file_byte_address
*copyc amt$file_identifier
*copyc amt$file_length
*copyc amt$file_limit
*copyc amt$file_organization
*copyc amt$file_position
*copyc amt$forced_write
*copyc amt$global_file_position
*copyc amt$index_padding
*copyc amt$internal_code
*copyc amt$key_length
*copyc amt$key_position
*copyc amt$key_type
*copyc amt$label_exit_procedure
*copyc amt$label_options
*copyc amt$label_type
*copyc amt$local_file_name
*copyc amt$max_block_length
*copyc amt$max_record_length
*copyc amt$message_control
*copyc amt$min_block_length
*copyc amt$min_record_length
*copyc amt$padding_character
*copyc amt$record_limit
*copyc amt$record_type
*copyc amt$records_per_block
*copyc amt$return_option
*copyc amt$user_info
*copyc amt$vertical_print_density
*copyc bat$tape_descriptor
*copyc bat$task_file_table
*copyc ost$caller_identifier
*copyc ost$status
*copyc rmt$device_classes
?? POP ??
*copyc baf$task_file_entry_p
*copyc amp$set_file_instance_abnormal
*copyc avp$ring_min
*copyc clp$check_name_for_path_handle
*copyc clp$convert_integer_to_string
*copyc clp$convert_string_to_file_ref
*copyc clp$validate_name
*copyc cmp$get_element_name_via_lun
*copyc dmp$convert_sfid_to_lun
*copyc fmp$add_to_file_description
*copyc fmp$change_file_attributes
*copyc fmp$get_device_class_and_sfid
*copyc fmp$get_files_volume_info
*copyc fmp$get_label_attributes
*copyc fmp$get_resolved_file_reference
*copyc fmp$get_setfa_dynamic_attrs
*copyc fmp$process_pt_request
*copyc fmp$return_file
*copyc fmp$set_attachment_options
*copyc fsp$path_element
*copyc fsp$set_evaluated_file_abnormal
*copyc iop$get_tape_usage_data
*copyc mmp$get_segment_length
*copyc osp$append_status_integer
*copyc osp$append_status_parameter
*copyc osp$set_status_abnormal
*copyc osp$set_status_condition
*copyc osp$verify_system_privilege
*copyc amv$label_options
*copyc amv$message_control
*copyc amv$valid_ring
*copyc bav$task_file_table
*copyc fsv$evaluated_file_reference
*copyc rmv$null_device_set
*copyc bai$tape_descriptor
?? OLDTITLE ??
?? NEWTITLE := 'Global Declarations Referenced By This Module', EJECT ??

  VAR
    null_set: [STATIC, READ, oss$job_paged_literal] pft$usage_selections := [];

?? TITLE := 'bap$fetch_access_information', EJECT ??
*copyc bah$fetch_access_information

  PROCEDURE [XDCL, #GATE] bap$fetch_access_information
    (    file_identifier: amt$file_identifier;
         call_block: amt$call_block;
         fap_layer_number: amt$fap_layer_number;
     VAR status: ost$status);

    VAR
      block_number: ost$non_negative_integers,
      device_class: rmt$device_class,
      element_name: ost$name,
      fetch_status: ost$status,
      fetch_eoi: ost$segment_length,
      caller_id: ost$caller_identifier,
      access_info_ptr: ^amt$access_information,
      access_info_p: ^amt$access_info,
      file_instance_p: ^bat$task_file_entry,
      index_string: ost$string,
      logical_unit: iot$logical_unit,
      positioning_info_p: ^bat$positioning_info,
      sfid: gft$system_file_identifier,
      tape_descriptor: ^bat$tape_descriptor,
      tapemark_number: ost$non_negative_integers,
      volume_info: array [1 .. 1] of fmt$volume_info,
      loop_index: integer;

    #CALLER_ID (caller_id);
    status.normal := TRUE;
    fetch_status.normal := TRUE;

    file_instance_p := baf$task_file_entry_p (file_identifier);
    IF file_instance_p = NIL THEN
      osp$set_status_condition (ame$improper_file_id, status);
      RETURN; {----->
    IFEND;

    IF (caller_id.ring <> 3)
{ } AND (caller_id.ring > file_instance_p^.instance_attributes.static_label.ring_attributes.r3) THEN
      amp$set_file_instance_abnormal (file_identifier, ame$ring_validation_error, call_block.operation,
            'BAP$FETCH_ACCESS_INFO-ring validation', status);
      RETURN; {----->
    IFEND;

    IF file_instance_p^.private_read_information = NIL THEN
      positioning_info_p := ^file_instance_p^.global_file_information^.positioning_info;
    ELSE
      positioning_info_p := ^file_instance_p^.private_read_information^.positioning_info;
    IFEND;

    access_info_ptr := call_block.fai.access_information;

    FOR loop_index := LOWERBOUND (access_info_ptr^) TO UPPERBOUND (access_info_ptr^) DO
      access_info_p := ^access_info_ptr^ [loop_index];
      CASE access_info_p^.key OF
      = amc$altered_not_closed =
        access_info_p^.item_returned := FALSE;

      = amc$block_number =
        access_info_p^.block_number := positioning_info_p^.block_info.block_number;
        access_info_p^.item_returned := TRUE;

      = amc$current_byte_address =
        access_info_p^.current_byte_address := positioning_info_p^.record_info.current_byte_address;
        access_info_p^.item_returned := TRUE;

      = amc$duplicate_value_inserted =
        access_info_p^.item_returned := FALSE;

      = amc$eoi_byte_address =
        IF (file_instance_p^.access_level = amc$segment) AND
              (file_instance_p^.device_class = rmc$mass_storage_device) THEN
          mmp$get_segment_length (file_instance_p^.file_pva, caller_id.ring, fetch_eoi, fetch_status);
          IF fetch_status.normal THEN
            access_info_p^.eoi_byte_address := fetch_eoi;
            access_info_p^.item_returned := TRUE;
          ELSE
            access_info_p^.item_returned := FALSE;
          IFEND;
        ELSE
          access_info_p^.eoi_byte_address := file_instance_p^.global_file_information^.eoi_byte_address;
          access_info_p^.item_returned := TRUE;
        IFEND;

      = amc$error_count =
        access_info_p^.item_returned := FALSE;
        { error_count was deleted in the conversion from ftd to
        { private_read_information but the default value is being returned
        { for those callers who previously expected a value.
        access_info_p^.error_count := 0;

      = amc$error_status =
        IF file_instance_p^.private_read_information = NIL THEN
          access_info_p^.error_status := file_instance_p^.global_file_information^.error_status;
        ELSE
          access_info_p^.error_status := file_instance_p^.private_read_information^.error_status;
        IFEND;
        access_info_p^.item_returned := TRUE;

      = amc$file_position =
        access_info_p^.file_position := positioning_info_p^.record_info.file_position;
        access_info_p^.item_returned := TRUE;

      = amc$last_access_operation =
        IF file_instance_p^.private_read_information = NIL THEN
          access_info_p^.last_access_operation := file_instance_p^.global_file_information^.
                last_access_operation;
        ELSE
          access_info_p^.last_access_operation := file_instance_p^.private_read_information^.
                last_access_operation;
        IFEND;
        access_info_p^.item_returned := TRUE;

      = amc$last_op_status =
        access_info_p^.item_returned := FALSE;
        { last_op_status was deleted in the conversion from ftd to
        { private_read_information but the default value is being returned
        { for those callers who previously expected a value.
        access_info_p^.last_op_status := amc$complete;

      = amc$levels_of_indexing =
        access_info_p^.item_returned := FALSE;
        { levels_of_indexing was deleted in the conversion from ftd to
        { private_read_information but the default value is being returned
        { for those callers who previously expected a value.
        access_info_p^.levels_of_indexing := 0;

      = amc$lock_file_residence =
        access_info_p^.item_returned := FALSE;

      = amc$null_item =
        access_info_p^.item_returned := FALSE;

      = amc$number_of_nested_files =
        access_info_p^.item_returned := FALSE;

      = amc$number_of_volumes =
        volume_info [1].key := fmc$number_of_volumes;
        fmp$get_files_volume_info (file_instance_p^.local_file_name, volume_info, fetch_status);
        IF NOT fetch_status.normal THEN
          access_info_p^.item_returned := FALSE;
        ELSE
          IF volume_info [1].item_returned THEN
            access_info_p^.number_of_volumes := volume_info [1].number_of_volumes;
            access_info_p^.item_returned := TRUE;
          ELSE
            access_info_p^.item_returned := FALSE;
          IFEND;
        IFEND;

      = amc$physical_volume_position =
        fmp$get_device_class_and_sfid (file_instance_p^.local_file_name, device_class, sfid, fetch_status);
        IF NOT fetch_status.normal OR (device_class <> rmc$magnetic_tape_device) THEN
          access_info_p^.item_returned := FALSE;
        ELSE
          iop$get_tape_usage_data (sfid, block_number, tapemark_number, fetch_status);
          IF NOT fetch_status.normal THEN
            access_info_p^.item_returned := FALSE;
          ELSE
            access_info_p^.item_returned := TRUE;
            access_info_p^.physical_volume_position.block_number := block_number;
            access_info_p^.physical_volume_position.tapemark_number := tapemark_number;
          IFEND;
        IFEND;

      = amc$previous_record_address =
        access_info_p^.previous_record_address := positioning_info_p^.record_info.bor_address;
        access_info_p^.item_returned := TRUE;

      = amc$previous_record_length =
        IF positioning_info_p^.record_info.file_position <> amc$mid_record THEN
          access_info_p^.previous_record_length := positioning_info_p^.record_info.record_length;
          access_info_p^.item_returned := TRUE;
        ELSE
          access_info_p^.item_returned := FALSE;
        IFEND;

      = amc$primary_key =
        access_info_p^.item_returned := FALSE;

      = amc$residual_skip_count =
        access_info_p^.residual_skip_count := file_instance_p^.residual_skip_count;
        access_info_p^.item_returned := TRUE;

      = amc$segment_count =
        access_info_p^.item_returned := FALSE;

      = amc$segment_information =
        access_info_p^.item_returned := FALSE;

      = amc$selected_key_name =
        access_info_p^.item_returned := FALSE;

      = amc$selected_nested_file =
        access_info_p^.item_returned := FALSE;

      = amc$size_in_blocks =
        access_info_p^.item_returned := FALSE;

      = amc$tape_element_name =
        access_info_p^.item_returned := FALSE;
        fmp$get_device_class_and_sfid (file_instance_p^.local_file_name, device_class, sfid, fetch_status);
        IF fetch_status.normal AND (device_class = rmc$magnetic_tape_device) THEN
          dmp$convert_sfid_to_lun (sfid, logical_unit, fetch_status);
          IF fetch_status.normal THEN
            cmp$get_element_name_via_lun (logical_unit, element_name, fetch_status);
            IF fetch_status.normal THEN
              access_info_p^.item_returned := TRUE;
              access_info_p^.tape_element_name := element_name;
            IFEND;
          IFEND;
        IFEND;

      = amc$tape_failure_isolation =
        access_info_p^.item_returned := FALSE;
        IF file_instance_p^.global_file_information^.device_dependent_info.device_class <>
              rmc$magnetic_tape_device THEN
          access_info_p^.item_returned := FALSE;
        ELSE
          RESET file_instance_p^.global_file_information^.device_dependent_info.tape_descriptor;
          NEXT tape_descriptor IN file_instance_p^.global_file_information^.device_dependent_info.
                tape_descriptor;
          access_info_p^.tape_failure_isolation := tape_descriptor^.failure_isolation;
          access_info_p^.item_returned := TRUE;
        IFEND;

      = amc$volume_description =
        volume_info [1].key := fmc$volume;
        volume_info [1].requested_volume_number := access_info_p^.volume_index;
        fmp$get_files_volume_info (file_instance_p^.local_file_name, volume_info, fetch_status);
        IF NOT fetch_status.normal THEN
          access_info_p^.item_returned := FALSE;
        ELSE
          IF volume_info [1].item_returned THEN
            access_info_p^.volume_description := volume_info [1].volume;
            access_info_p^.item_returned := TRUE;
          ELSE
            access_info_p^.item_returned := FALSE;
          IFEND;
        IFEND;

      = amc$volume_position =
        IF file_instance_p^.global_file_information^.device_dependent_info.device_class <>
              rmc$magnetic_tape_device THEN
          access_info_p^.item_returned := FALSE;
        ELSE
          RESET file_instance_p^.global_file_information^.device_dependent_info.tape_descriptor;
          NEXT tape_descriptor IN file_instance_p^.global_file_information^.device_dependent_info.
                tape_descriptor;
          access_info_p^.volume_position := tape_descriptor^.volume_position;
          access_info_p^.item_returned := TRUE;
        IFEND;

      = amc$volume_number =
        IF file_instance_p^.global_file_information^.device_dependent_info.device_class <>
              rmc$magnetic_tape_device THEN
          access_info_p^.item_returned := FALSE;
        ELSE
          RESET file_instance_p^.global_file_information^.device_dependent_info.tape_descriptor;
          NEXT tape_descriptor IN file_instance_p^.global_file_information^.device_dependent_info.
                tape_descriptor;
          access_info_p^.volume_number := tape_descriptor^.volume_number;
          access_info_p^.item_returned := TRUE;
        IFEND;

      ELSE
        IF status.normal THEN
          clp$convert_integer_to_string (loop_index, 10, FALSE, index_string, fetch_status);
          amp$set_file_instance_abnormal (file_identifier, ame$improper_access_info_key, call_block.operation,
                index_string.value (1, index_string.size), status);
        ELSE
          osp$append_status_integer (osc$status_parameter_delimiter, loop_index, 10, FALSE, status);
        IFEND;
      CASEND;
    FOREND;

  PROCEND bap$fetch_access_information;
?? TITLE := 'bap$fetch', EJECT ??
*copyc bah$fetch

  PROCEDURE [XDCL, #GATE] bap$fetch
    (    file_identifier: amt$file_identifier;
         call_block: amt$call_block;
         fap_layer_number: amt$fap_layer_number;
     VAR status: ost$status);

    VAR
      caller_id: ost$caller_identifier,
      cl_path_handle: clt$path_handle,
      file_attribute_p: ^amt$fetch_item,
      file_attributes: ^amt$fetch_attributes,
      file_instance_p: ^bat$task_file_entry,
      i: integer,
      p_evaluated_file_reference: ^fst$evaluated_file_reference,
      resolved_file_reference: fst$resolved_file_reference,
      static_label: bat$static_label_attributes,
      tape_descriptor: ^bat$tape_descriptor;

    #CALLER_ID (caller_id);
    status.normal := TRUE;
    file_instance_p := baf$task_file_entry_p (file_identifier);
    IF file_instance_p = NIL THEN
      osp$set_status_condition (ame$improper_file_id, status);
      RETURN; {----->
    IFEND;

    IF (caller_id.ring <> 3)
{ } AND (caller_id.ring > file_instance_p^.instance_attributes.static_label.ring_attributes.r3) THEN
      amp$set_file_instance_abnormal (file_identifier, ame$ring_validation_error, call_block.operation,
            'BAP$FETCH-ring validation', status);
      RETURN; {----->
    IFEND;

    file_attributes := call_block.fetch.file_attributes;
    fmp$get_label_attributes (file_instance_p^.system_file_label, static_label, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    FOR i := LOWERBOUND (file_attributes^) TO UPPERBOUND (file_attributes^) DO
      file_attribute_p := ^file_attributes^ [i];
      CASE file_attribute_p^.key OF
      = amc$access_level =
        file_attribute_p^.access_level := file_instance_p^.access_level;
        file_attribute_p^.source := amc$open_request;

      = amc$access_mode =
        file_attribute_p^.access_mode := file_instance_p^.instance_attributes.dynamic_label.access_mode;
        file_attribute_p^.source := file_instance_p^.instance_attributes.dynamic_label.access_mode_source;

      = amc$application_info =
        file_attribute_p^.application_info := file_instance_p^.system_file_label^.descriptive_label.
              application_info;
        file_attribute_p^.source := file_instance_p^.system_file_label^.descriptive_label.
              application_info_source;

      = amc$block_type =
        file_attribute_p^.block_type := file_instance_p^.instance_attributes.static_label.block_type;
        file_attribute_p^.source := file_instance_p^.instance_attributes.static_label.block_type_source;

      = amc$character_conversion =
        IF file_instance_p^.device_class = rmc$magnetic_tape_device THEN
          file_attribute_p^.character_conversion := file_instance_p^.labeled_tape_state_info.
                character_conversion;
          IF file_instance_p^.labeled_tape_state_info.character_conversion =
                static_label.character_conversion THEN
            file_attribute_p^.source := static_label.character_conversion_source;
          ELSE
            file_attribute_p^.source := amc$local_file_information;
          IFEND;
        ELSE
          file_attribute_p^.character_conversion := static_label.character_conversion;
          file_attribute_p^.source := static_label.character_conversion_source;
        IFEND;

      = amc$clear_space =
        file_attribute_p^.clear_space := static_label.clear_space;
        file_attribute_p^.source := static_label.clear_space_source;

      = amc$device_class =
        file_attribute_p^.device_class := file_instance_p^.device_class;
        file_attribute_p^.source := amc$open_request;

      = amc$error_exit_name =
        file_attribute_p^.error_exit_name := file_instance_p^.instance_attributes.dynamic_label.
              error_exit_name;
        file_attribute_p^.source := file_instance_p^.instance_attributes.dynamic_label.error_exit_name_source;

      = amc$error_exit_procedure =
        file_attribute_p^.error_exit_procedure := file_instance_p^.instance_attributes.dynamic_label.
              error_exit_procedure;
        file_attribute_p^.source := file_instance_p^.instance_attributes.dynamic_label.
              error_exit_procedure_source;

      = amc$error_options =
        file_attribute_p^.error_options := file_instance_p^.instance_attributes.dynamic_label.error_options;
        file_attribute_p^.source := file_instance_p^.instance_attributes.dynamic_label.error_options_source;

      = amc$file_access_procedure =
        file_attribute_p^.file_access_procedure := static_label.file_access_procedure;
        file_attribute_p^.source := static_label.file_access_procedure_source;

      = amc$file_contents =
        file_attribute_p^.file_contents := static_label.file_contents;
        file_attribute_p^.source := static_label.file_contents_source;

      = amc$file_limit =
        file_attribute_p^.file_limit := static_label.file_limit;
        file_attribute_p^.source := static_label.file_limit_source;

      = amc$file_organization =
        file_attribute_p^.file_organization := file_instance_p^.instance_attributes.static_label.
              file_organization;
        file_attribute_p^.source := file_instance_p^.instance_attributes.static_label.
              file_organization_source;

      = amc$file_processor =
        file_attribute_p^.file_processor := static_label.file_processor;
        file_attribute_p^.source := static_label.file_processor_source;

      = amc$file_structure =
        file_attribute_p^.file_structure := static_label.file_structure;
        file_attribute_p^.source := static_label.file_structure_source;

      = amc$forced_write =
        file_attribute_p^.forced_write := static_label.forced_write;
        file_attribute_p^.source := static_label.forced_write_source;

      = amc$global_access_mode =
        file_attribute_p^.global_access_mode := file_instance_p^.system_file_label^.descriptive_label.
              global_access_mode;
        file_attribute_p^.source := file_instance_p^.system_file_label^.descriptive_label.
              global_access_mode_source;

      = amc$global_file_address =
        file_attribute_p^.global_file_address := file_instance_p^.global_file_information^.positioning_info.
              record_info.current_byte_address;
        file_attribute_p^.source := amc$local_file_information;

      = amc$global_file_name =
        file_attribute_p^.global_file_name := file_instance_p^.system_file_label^.descriptive_label.
              global_file_name;
        file_attribute_p^.source := file_instance_p^.system_file_label^.descriptive_label.
              global_file_name_source;

      = amc$global_file_position =
        file_attribute_p^.global_file_position := file_instance_p^.global_file_information^.positioning_info.
              record_info.file_position;
        file_attribute_p^.source := amc$local_file_information;

      = amc$global_share_mode =
        file_attribute_p^.global_share_mode := file_instance_p^.system_file_label^.descriptive_label.
              global_share_mode;
        file_attribute_p^.source := file_instance_p^.system_file_label^.descriptive_label.
              global_share_mode_source;

      = amc$initial_open =
        file_attribute_p^.initial_open := file_instance_p^.initial_open;
        file_attribute_p^.source := amc$open_request;

      = amc$input_device_classes =
        IF file_instance_p^.device_class IN rmv$null_device_set THEN
          file_attribute_p^.input_device_classes := $rmt$device_classes
                [file_instance_p^.device_class, rmc$null_device];
        ELSE
          file_attribute_p^.input_device_classes := $rmt$device_classes [file_instance_p^.device_class];
        IFEND;

      = amc$internal_code =
        IF file_instance_p^.device_class = rmc$magnetic_tape_device THEN
          file_attribute_p^.internal_code := file_instance_p^.labeled_tape_state_info.character_set;
          IF file_instance_p^.labeled_tape_state_info.character_set = static_label.internal_code THEN
            file_attribute_p^.source := static_label.internal_code_source;
          ELSE
            file_attribute_p^.source := amc$local_file_information;
          IFEND;
        ELSE
          file_attribute_p^.internal_code := static_label.internal_code;
          file_attribute_p^.source := static_label.internal_code_source;
        IFEND;

      = amc$label_exit_name =
        file_attribute_p^.label_exit_name := file_instance_p^.instance_attributes.dynamic_label.
              label_exit_name;
        file_attribute_p^.source := file_instance_p^.instance_attributes.dynamic_label.label_exit_name_source;

      = amc$label_exit_procedure =
        file_attribute_p^.label_exit_procedure := file_instance_p^.instance_attributes.dynamic_label.
              label_exit_procedure;
        file_attribute_p^.source := file_instance_p^.instance_attributes.dynamic_label.
              label_exit_procedure_source;

      = amc$label_options =
        file_attribute_p^.label_options := file_instance_p^.instance_attributes.dynamic_label.label_options;
        file_attribute_p^.source := file_instance_p^.instance_attributes.dynamic_label.label_options_source;

      = amc$label_type =
        file_attribute_p^.label_type := static_label.label_type;
        file_attribute_p^.source := static_label.label_type_source;

      = amc$line_number =
        file_attribute_p^.line_number := static_label.line_number;
        file_attribute_p^.source := static_label.line_number_source;

      = amc$max_block_length =
        IF (file_instance_p^.device_class = rmc$magnetic_tape_device) THEN
          file_attribute_p^.max_block_length := file_instance_p^.labeled_tape_state_info.maximum_block_length;
          IF file_instance_p^.labeled_tape_state_info.maximum_block_length =
                static_label.max_block_length THEN
            file_attribute_p^.source := static_label.max_block_length_source;
          ELSE
            file_attribute_p^.source := amc$local_file_information;
          IFEND;
        ELSE
          file_attribute_p^.max_block_length := static_label.max_block_length;
          file_attribute_p^.source := static_label.max_block_length_source;
        IFEND;

      = amc$max_record_length =
        IF (file_instance_p^.device_class = rmc$magnetic_tape_device) THEN
          file_attribute_p^.max_record_length := file_instance_p^.labeled_tape_state_info.
                maximum_record_length;
          IF file_instance_p^.labeled_tape_state_info.maximum_record_length =
                static_label.max_record_length THEN
            file_attribute_p^.source := static_label.max_record_length_source;
          ELSE
            file_attribute_p^.source := amc$local_file_information;
          IFEND;
        ELSE
          file_attribute_p^.max_record_length := static_label.max_record_length;
          file_attribute_p^.source := static_label.max_record_length_source;
        IFEND;

      = amc$min_block_length =
        file_attribute_p^.min_block_length := static_label.min_block_length;
        file_attribute_p^.source := static_label.min_block_length_source;

      = amc$min_record_length =
        file_attribute_p^.min_record_length := static_label.min_record_length;
        file_attribute_p^.source := static_label.min_record_length_source;

      = amc$null_attribute =
        ;
      = amc$open_attached_file =
        file_attribute_p^.open_attached_file := file_instance_p^.open_actions.open_attached_file;
        file_attribute_p^.source := amc$open_request;

      = amc$open_created_file =
        file_attribute_p^.open_created_file := file_instance_p^.open_actions.open_created_file;
        file_attribute_p^.source := amc$open_request;

      = amc$open_deleted_data =
        file_attribute_p^.open_deleted_data := file_instance_p^.open_actions.open_deleted_data;
        file_attribute_p^.source := amc$open_request;

      = amc$open_share_modes =
        file_attribute_p^.open_share_modes := file_instance_p^.instance_attributes.dynamic_label.
              open_share_modes;
        file_attribute_p^.source := file_instance_p^.instance_attributes.dynamic_label.
              open_share_modes_source;

      = amc$open_position =
        file_attribute_p^.open_position := file_instance_p^.instance_attributes.dynamic_label.open_position;
        file_attribute_p^.source := file_instance_p^.instance_attributes.dynamic_label.open_position_source;

      = amc$output_device_classes =
        IF file_instance_p^.device_class IN rmv$null_device_set THEN
          file_attribute_p^.output_device_classes := $rmt$device_classes
                [file_instance_p^.device_class, rmc$null_device];
        ELSE
          file_attribute_p^.output_device_classes := $rmt$device_classes [file_instance_p^.device_class];
        IFEND;

      = amc$padding_character =
        IF (file_instance_p^.device_class = rmc$magnetic_tape_device) THEN
          file_attribute_p^.padding_character := file_instance_p^.labeled_tape_state_info.padding_character;
          IF file_instance_p^.labeled_tape_state_info.padding_character = static_label.padding_character THEN
            file_attribute_p^.source := static_label.padding_character_source;
          ELSE
            file_attribute_p^.source := amc$local_file_information;
          IFEND;
        ELSE
          file_attribute_p^.padding_character := static_label.padding_character;
          file_attribute_p^.source := static_label.padding_character_source;
        IFEND;

      = amc$page_format =
        file_attribute_p^.page_format := static_label.page_format;
        file_attribute_p^.source := static_label.page_format_source;

      = amc$page_length =
        file_attribute_p^.page_length := static_label.page_length;
        file_attribute_p^.source := static_label.page_length_source;

      = amc$page_width =
        file_attribute_p^.page_width := static_label.page_width;
        file_attribute_p^.source := static_label.page_width_source;

      = amc$permanent_file =
        file_attribute_p^.permanent_file := file_instance_p^.system_file_label^.descriptive_label.
              permanent_file;
        file_attribute_p^.source := file_instance_p^.system_file_label^.descriptive_label.
              permanent_file_source;

      = amc$preset_value =
        file_attribute_p^.preset_value := static_label.preset_value;
        file_attribute_p^.source := static_label.preset_value_source;

      = amc$private_read =
        file_attribute_p^.private_read := file_instance_p^.private_read_information <> NIL;
        file_attribute_p^.source := amc$open_request;

      = amc$record_delimiting_character =
        file_attribute_p^.record_delimiting_character := static_label.record_delimiting_character;
        file_attribute_p^.source := static_label.record_delimiting_char_source;

      = amc$record_type =
        file_attribute_p^.record_type := file_instance_p^.instance_attributes.static_label.record_type;
        file_attribute_p^.source := file_instance_p^.instance_attributes.static_label.record_type_source;

      = amc$requested_tape_density =
        IF file_instance_p^.device_class = rmc$magnetic_tape_device THEN
          tape_descriptor := bai$tape_descriptor (file_instance_p);
          file_attribute_p^.requested_tape_density := tape_descriptor^.requested_density;
          file_attribute_p^.source := amc$local_file_information;
        ELSE
          file_attribute_p^.source := amc$undefined_attribute;
        IFEND;

      = amc$resolved_file_reference =
        clp$check_name_for_path_handle (file_instance_p^.local_file_name, cl_path_handle);
        IF (file_instance_p^.instance_attributes.dynamic_label.open_position_source = amc$file_reference) OR
              (file_instance_p^.instance_attributes.dynamic_label.open_position_source = amc$open_request)
              THEN
          cl_path_handle.regular_handle.open_position.specified := TRUE;
          cl_path_handle.regular_handle.open_position.value :=
                file_instance_p^.instance_attributes.dynamic_label.open_position;
        ELSE
          cl_path_handle.regular_handle.open_position.specified := FALSE;
        IFEND;
        PUSH p_evaluated_file_reference;
        p_evaluated_file_reference^ := fsv$evaluated_file_reference;
        p_evaluated_file_reference^.path_handle_info.path_handle := cl_path_handle.regular_handle;
        p_evaluated_file_reference^.path_handle_info.path_handle_present := TRUE;
        fmp$get_resolved_file_reference (p_evaluated_file_reference^, resolved_file_reference, status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF file_attribute_p^.resolved_file_reference <> NIL THEN
          file_attribute_p^.resolved_file_reference^ := resolved_file_reference;
          file_attribute_p^.source := amc$open_request;
        IFEND;

      = amc$ring_attributes =
        file_attribute_p^.ring_attributes := file_instance_p^.instance_attributes.static_label.
              ring_attributes;
        file_attribute_p^.source := file_instance_p^.instance_attributes.static_label.ring_attributes_source;

      = amc$statement_identifier =
        file_attribute_p^.statement_identifier := static_label.statement_identifier;
        file_attribute_p^.source := static_label.statement_identifier_source;

      = amc$user_info =
        file_attribute_p^.user_info := static_label.user_info;
        file_attribute_p^.source := static_label.user_info_source;

      = amc$vertical_print_density =
        file_attribute_p^.vertical_print_density := static_label.vertical_print_density;
        file_attribute_p^.source := static_label.vertical_print_density_source;

      = amc$actual_block_length =
        file_attribute_p^.source := amc$undefined_attribute;

      = amc$average_record_length =
        file_attribute_p^.average_record_length := static_label.average_record_length;
        file_attribute_p^.source := static_label.average_record_length_source;

      = amc$collate_table =
        file_attribute_p^.collate_table^ := static_label.collate_table;
        file_attribute_p^.source := static_label.collate_table_source;

      = amc$collate_table_name =
        file_attribute_p^.collate_table_name := static_label.collate_table_name;
        file_attribute_p^.source := static_label.collate_table_name_source;

      = amc$compression_procedure_name =
        IF file_attribute_p^.compression_procedure_name <> NIL THEN
          file_attribute_p^.compression_procedure_name^ := static_label.compression_procedure_name;
          file_attribute_p^.source := static_label.compression_proc_name_source;
        IFEND;

      = amc$data_padding =
        file_attribute_p^.data_padding := static_label.data_padding;
        file_attribute_p^.source := static_label.data_padding_source;

      = amc$dynamic_home_block_space =
        file_attribute_p^.dynamic_home_block_space := static_label.dynamic_home_block_space;
        file_attribute_p^.source := static_label.dynamic_home_block_space_source;

      = amc$embedded_key =
        file_attribute_p^.embedded_key := static_label.embedded_key;
        file_attribute_p^.source := static_label.embedded_key_source;

      = amc$error_limit =
        file_attribute_p^.error_limit := file_instance_p^.instance_attributes.dynamic_label.error_limit;
        file_attribute_p^.source := file_instance_p^.instance_attributes.dynamic_label.error_limit_source;

      = amc$estimated_record_count =
        file_attribute_p^.estimated_record_count := static_label.estimated_record_count;
        file_attribute_p^.source := static_label.estimated_record_count_source;

      = amc$hashing_procedure_name =
        IF file_attribute_p^.hashing_procedure_name <> NIL THEN
          file_attribute_p^.hashing_procedure_name^ := static_label.hashing_procedure_name;
          file_attribute_p^.source := static_label.hashing_procedure_name_source;
        IFEND;

      = amc$index_levels =
        file_attribute_p^.index_levels := static_label.index_levels;
        file_attribute_p^.source := static_label.index_levels_source;

      = amc$index_padding =
        file_attribute_p^.index_padding := static_label.index_padding;
        file_attribute_p^.source := static_label.index_padding_source;

      = amc$initial_home_block_count =
        file_attribute_p^.initial_home_block_count := static_label.initial_home_block_count;
        file_attribute_p^.source := static_label.initial_home_block_count_source;

      = amc$key_length =
        file_attribute_p^.key_length := static_label.key_length;
        file_attribute_p^.source := static_label.key_length_source;

      = amc$key_position =
        file_attribute_p^.key_position := static_label.key_position;
        file_attribute_p^.source := static_label.key_position_source;

      = amc$key_type =
        file_attribute_p^.key_type := static_label.key_type;
        file_attribute_p^.source := static_label.key_type_source;

      = amc$keyed_file_bkup_for_logging =
        file_attribute_p^.source := amc$undefined_attribute;

      = amc$loading_factor =
        file_attribute_p^.loading_factor := static_label.loading_factor;
        file_attribute_p^.source := static_label.loading_factor_source;

      = amc$lock_expiration_time =
        file_attribute_p^.lock_expiration_time := static_label.lock_expiration_time;
        file_attribute_p^.source := static_label.lock_expiration_time_source;

      = amc$logging_options =
        file_attribute_p^.logging_options := static_label.logging_options;
        file_attribute_p^.source := static_label.logging_options_source;

      = amc$log_residence =
        IF file_attribute_p^.log_residence <> NIL THEN
          file_attribute_p^.log_residence^ := static_label.log_residence;
          file_attribute_p^.source := static_label.log_residence_source;
        IFEND;

      = amc$message_control =
        file_attribute_p^.message_control := file_instance_p^.instance_attributes.dynamic_label.
              message_control;
        file_attribute_p^.source := file_instance_p^.instance_attributes.dynamic_label.message_control_source;

      = amc$record_limit =
        file_attribute_p^.record_limit := static_label.record_limit;
        file_attribute_p^.source := static_label.record_limit_source;

      = amc$records_per_block =
        file_attribute_p^.records_per_block := static_label.records_per_block;
        file_attribute_p^.source := static_label.records_per_block_source;

      ELSE
        IF status.normal THEN
          amp$set_file_instance_abnormal (file_identifier, ame$improper_file_attrib_key, call_block.operation,
                'FILE_ATTRIBUTES', status);
          osp$append_status_integer (osc$status_parameter_delimiter, i, 10, FALSE, status);
        IFEND;
        RETURN; {----->
      CASEND;
    FOREND;

  PROCEND bap$fetch;

?? TITLE := 'PROCEDURE [XDCL, #GATE] bap$set_attachment_options', EJECT ??

  PROCEDURE [XDCL, #GATE] bap$set_attachment_options
    (    file: fst$file_reference;
         attachment_options: fmt$cd_attachment_options;
         p_volume_list: {input} ^rmt$volume_list;
     VAR status: ost$status);

    osp$verify_system_privilege;

    IF attachment_options.transfer_size_specified
{ } AND ((attachment_options.transfer_size < LOWERVALUE (fst$transfer_size))
{   } OR (attachment_options.transfer_size > UPPERVALUE (fst$transfer_size))) THEN
      osp$set_status_abnormal (amc$access_method_id, fme$system_error,
            'Improper specification of attachment_options on BAP$SET_ATTACHMENT_OPTIONS', status);
      RETURN; {----->
    IFEND;

    fmp$set_attachment_options (file, attachment_options, p_volume_list, status);

  PROCEND bap$set_attachment_options;

?? TITLE := 'bap$store', EJECT ??
*copyc bah$store

  PROCEDURE [XDCL, #GATE] bap$store
    (    file_identifier: amt$file_identifier;
         call_block: amt$call_block;
         fap_layer_number: amt$fap_layer_number;
     VAR status: ost$status);

    VAR
      caller_id: ost$caller_identifier,
      file_instance_p: ^bat$task_file_entry,
      i: integer,
      store_attr: ^amt$store_attributes,
      store_item_p: ^amt$store_item,
      text: ost$name;

    #CALLER_ID (caller_id);
    status.normal := TRUE;
    file_instance_p := baf$task_file_entry_p (file_identifier);
    IF file_instance_p = NIL THEN
      osp$set_status_condition (ame$improper_file_id, status);
      RETURN; {----->
    IFEND;

    IF (caller_id.ring <> 3)
{ } AND ((($pft$usage_selections [pfc$shorten, pfc$append, pfc$modify] *
          file_instance_p^.instance_attributes.dynamic_label.access_mode) <> $pft$usage_selections []) AND
          (caller_id.ring > file_instance_p^.instance_attributes.static_label.ring_attributes.r1)) OR
          ((pfc$read IN file_instance_p^.instance_attributes.dynamic_label.access_mode) AND
          (caller_id.ring > file_instance_p^.instance_attributes.static_label.ring_attributes.r2)) OR
          (caller_id.ring > file_instance_p^.instance_attributes.static_label.ring_attributes.r3) THEN
      amp$set_file_instance_abnormal (file_identifier, ame$ring_validation_error, call_block.operation,
            'BAP$STORE-ring validation', status);
      RETURN; {----->
    IFEND;
    store_attr := call_block.store.file_attributes;

    text := osc$null_name;

  /verify_loop/
    FOR i := 1 TO UPPERBOUND (store_attr^) DO
      store_item_p := ^store_attr^ [i];
      CASE store_item_p^.key OF
      = amc$error_exit_procedure =
        ;
      = amc$error_options =
        IF (store_item_p^.error_options.error_action < LOWERVALUE (amt$tape_error_action)) { } OR
              (store_item_p^.error_options.error_action > UPPERVALUE (amt$tape_error_action)) {      { } OR
              (store_item_p^.error_options.perform_failure_recovery < LOWERVALUE (boolean))
              { } OR (store_item_p^.error_options.perform_failure_recovery > UPPERVALUE (boolean)) THEN
          text := 'ERROR_OPTIONS';
        IFEND;

      = amc$label_exit_procedure =
        ;
      = amc$label_options =
        IF NOT (store_item_p^.label_options <= amv$label_options) THEN
          text := 'LABEL_OPTIONS';
        IFEND;

      = amc$null_attribute =
        ;
        { aam }

      = amc$error_limit =
        IF (store_item_p^.error_limit < LOWERVALUE (amt$error_limit)) { } OR
              (store_item_p^.error_limit > UPPERVALUE (amt$error_limit)) THEN
          text := 'ERROR_LIMIT';
        IFEND;

      = amc$message_control =
        IF NOT (store_item_p^.message_control <= amv$message_control) THEN
          text := 'MESSAGE_CONTROL';
        IFEND;

      ELSE
        IF status.normal THEN
          amp$set_file_instance_abnormal (file_identifier, ame$improper_file_attrib_key, call_block.operation,
                'FILE_ATTRIBUTES', status);
          osp$append_status_integer (osc$status_parameter_delimiter, i, 10, false, status);
        IFEND;

        EXIT /verify_loop/; {----->
      CASEND;

      IF text <> osc$null_name THEN
        IF status.normal THEN
          amp$set_file_instance_abnormal (file_identifier, ame$improper_file_attrib_value,
                call_block.operation, text, status);
        ELSE
          osp$append_status_parameter (osc$status_parameter_delimiter, text, status);
        IFEND;
        text := osc$null_name;
      IFEND;
    FOREND /verify_loop/;

    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    FOR i := 1 TO UPPERBOUND (store_attr^) DO
      store_item_p := ^store_attr^ [i];
      CASE store_item_p^.key OF
      = amc$error_exit_procedure =
        file_instance_p^.instance_attributes.dynamic_label.error_exit_procedure :=
              store_item_p^.error_exit_procedure;
        file_instance_p^.instance_attributes.dynamic_label.error_exit_procedure_source := amc$store_request;

      = amc$error_options =
        file_instance_p^.instance_attributes.dynamic_label.error_options := store_item_p^.error_options;
        file_instance_p^.instance_attributes.dynamic_label.error_options_source := amc$store_request;

      = amc$label_exit_procedure =
        file_instance_p^.instance_attributes.dynamic_label.label_exit_procedure :=
              store_item_p^.label_exit_procedure;
        file_instance_p^.instance_attributes.dynamic_label.label_exit_procedure_source := amc$store_request;

      = amc$label_options =
        file_instance_p^.instance_attributes.dynamic_label.label_options := store_item_p^.label_options;
        file_instance_p^.instance_attributes.dynamic_label.label_options_source := amc$store_request;

      = amc$error_limit =
        file_instance_p^.instance_attributes.dynamic_label.error_limit := store_item_p^.error_limit;
        file_instance_p^.instance_attributes.dynamic_label.error_limit_source := amc$store_request;

      = amc$message_control =
        file_instance_p^.instance_attributes.dynamic_label.message_control := store_item_p^.message_control;
        file_instance_p^.instance_attributes.dynamic_label.message_control_source := amc$store_request;

      = amc$null_attribute =
        ;
      CASEND; {Don't need an else, as we controlled each item above.
    FOREND;

  PROCEND bap$store;

?? TITLE := 'PROCEDURE [XDCL, #GATE] bap$get_setfa_dynamic_attrs', EJECT ??

  PROCEDURE [XDCL, #GATE] bap$get_setfa_dynamic_attrs
    (    file: fst$file_reference;
     VAR attached_permanent_file: boolean;
     VAR attached_share_modes: fst$file_access_options;
     VAR setfa_specified: boolean;
     VAR dynamic_attributes: fst$setfa_attachment_options;
     VAR status: ost$status);

    fmp$get_setfa_dynamic_attrs (file, attached_permanent_file, attached_share_modes, setfa_specified,
          dynamic_attributes, status);

  PROCEND bap$get_setfa_dynamic_attrs;

?? TITLE := 'bap$add_to_file_description', EJECT ??

  PROCEDURE [XDCL, #GATE] bap$add_to_file_description
    (    file_identifier: amt$file_identifier;
         file_attributes: ^amt$add_to_attributes;
     VAR status: ost$status);

    fmp$add_to_file_description (file_identifier, file_attributes^, status);

  PROCEND bap$add_to_file_description;

?? TITLE := 'bap$change_file_attributes', EJECT ??

  PROCEDURE [XDCL, #GATE] bap$change_file_attributes
    (    file_attributes: ^amt$file_attributes;
     VAR evaluated_file_reference: {i/o} fst$evaluated_file_reference;
     VAR open_changed_file: boolean;
     VAR status: ost$status);

    VAR
      attribute_validation_status: ost$status,
      caller_id: ost$caller_identifier,
      file_attribute_p: ^amt$file_item,
      i: integer,
      ignore_file: fst$parsed_file_reference,
      proposed_r1: ost$ring,
      proposed_r2: ost$ring,
      proposed_r3: ost$ring,
      text: ost$name,
      valid_name: boolean,
      validated_attr_name: ost$name;

    open_changed_file := FALSE;
    status.normal := TRUE;

    #CALLER_ID (caller_id);
    attribute_validation_status.normal := TRUE;

    IF file_attributes = NIL THEN
      RETURN; {----->
    IFEND;

{ validate file attributes }

    text := osc$null_name;
    FOR i := LOWERBOUND (file_attributes^) TO UPPERBOUND (file_attributes^) DO
      file_attribute_p := ^file_attributes^ [i];

      CASE file_attribute_p^.key OF
      = amc$file_access_procedure =
        IF file_attribute_p^.file_access_procedure <> osc$null_name THEN
          clp$validate_name (file_attribute_p^.file_access_procedure, validated_attr_name, valid_name);
          IF NOT valid_name THEN
            text := 'FILE_ACCESS_PROCEDURE';
          IFEND;
        IFEND;

      = amc$file_contents =
        clp$validate_name (file_attribute_p^.file_contents, validated_attr_name, valid_name);
        IF NOT valid_name THEN
          text := 'FILE_CONTENTS';
        IFEND;

      = amc$file_limit =
        IF (file_attribute_p^.file_limit < LOWERVALUE (amt$file_limit)) { } OR
              (file_attribute_p^.file_limit > UPPERVALUE (amt$file_limit)) THEN
          text := 'FILE_LIMIT';
        IFEND;

      = amc$file_processor =
        clp$validate_name (file_attribute_p^.file_processor, validated_attr_name, valid_name);
        IF NOT valid_name THEN
          text := 'FILE_PROCESSOR';
        IFEND;

      = amc$file_structure =
        clp$validate_name (file_attribute_p^.file_structure, validated_attr_name, valid_name);
        IF NOT valid_name THEN
          text := 'FILE_STRUCTURE';
        IFEND;

      = amc$forced_write =
        IF (file_attribute_p^.forced_write < LOWERVALUE (amt$forced_write)) { } OR
              (file_attribute_p^.forced_write > UPPERVALUE (amt$forced_write)) THEN
          text := 'FORCED_WRITE';
        IFEND;

      = amc$line_number =
        IF (file_attribute_p^.line_number.length < LOWERVALUE (amt$line_number_length)) { } OR
              (file_attribute_p^.line_number.length > UPPERVALUE (amt$line_number_length)) { } OR
              (file_attribute_p^.line_number.location < LOWERVALUE (amt$line_number_location)) { } OR
              (file_attribute_p^.line_number.location > UPPERVALUE (amt$line_number_location)) THEN
          text := 'LINE_NUMBER';
        IFEND;

      = amc$loading_factor =
        IF (file_attribute_p^.loading_factor < LOWERVALUE (amt$loading_factor)) OR
              (file_attribute_p^.loading_factor > UPPERVALUE (amt$loading_factor)) THEN
          text := 'LOADING_FACTOR';
        IFEND;

      = amc$lock_expiration_time =
        IF (file_attribute_p^.lock_expiration_time < LOWERVALUE (amt$lock_expiration_time)) OR
              (file_attribute_p^.lock_expiration_time > UPPERVALUE (amt$lock_expiration_time)) THEN
          text := 'LOCK_EXPIRATION_TIME';
        IFEND;

      = amc$logging_options =
        IF NOT (file_attribute_p^.logging_options <= $amt$logging_options
              [amc$enable_parcels, amc$enable_media_recovery, amc$enable_request_recovery]) THEN
          text := 'LOGGING_OPTIONS';
        IFEND;

      = amc$log_residence =
        IF file_attribute_p^.log_residence <> NIL THEN
          IF file_attribute_p^.log_residence^ <> osc$null_name THEN
            clp$convert_string_to_file_ref (file_attribute_p^.log_residence^, ignore_file, status);
            IF NOT status.normal THEN
              status.normal := TRUE; {improper status handled by text}
              text := 'LOG_RESIDENCE';
            IFEND;
          IFEND;
        IFEND;

      = amc$record_limit =
        IF (file_attribute_p^.record_limit < LOWERVALUE (amt$record_limit)) { } OR
              (file_attribute_p^.record_limit > UPPERVALUE (amt$record_limit)) THEN
          text := 'RECORD_LIMIT';
        IFEND;

      = amc$ring_attributes =
        proposed_r1 := file_attribute_p^.ring_attributes.r1;
        proposed_r2 := file_attribute_p^.ring_attributes.r2;
        proposed_r3 := file_attribute_p^.ring_attributes.r3;
        IF NOT ((proposed_r1 IN amv$valid_ring) { } AND (proposed_r2 IN amv$valid_ring) { } AND
              (proposed_r3 IN amv$valid_ring) { } AND (proposed_r1 <= proposed_r2) { } AND
              (proposed_r2 <= proposed_r3) { } AND (proposed_r3 <= 13)) THEN
          text := 'RING_ATTRIBUTES';
        ELSEIF attribute_validation_status.normal THEN
          IF proposed_r1 < avp$ring_min () THEN
            fsp$set_evaluated_file_abnormal (evaluated_file_reference, ame$ring_validation_error,
                  amc$change_file_attributes_cmd, '', status);
            RETURN; {----->
          IFEND;
        IFEND;

      = amc$statement_identifier =
        IF ((file_attribute_p^.statement_identifier.length < LOWERVALUE (amt$statement_id_length)) OR
              (file_attribute_p^.statement_identifier.length > UPPERVALUE (amt$statement_id_length)) OR
              (file_attribute_p^.statement_identifier.location < LOWERVALUE (amt$statement_id_location)) OR
              (file_attribute_p^.statement_identifier.location > UPPERVALUE (amt$statement_id_location))) THEN
          text := 'STATEMENT_IDENTIFIER';
        IFEND;
      = amc$user_info =
        ;
      ELSE
        IF status.normal THEN
          fsp$set_evaluated_file_abnormal (evaluated_file_reference, ame$improper_file_attrib_key,
                amc$change_file_attributes_cmd, 'FILE_ATTRIBUTES', status);
          osp$append_status_integer (osc$status_parameter_delimiter, i, 10, false, status);
          RETURN; {----->
        IFEND;
      CASEND;

      IF text <> osc$null_name THEN
        IF attribute_validation_status.normal THEN
          fsp$set_evaluated_file_abnormal (evaluated_file_reference, ame$improper_file_attrib_value,
                amc$change_file_attributes_cmd, 'FILE_ATTRIBUTES', attribute_validation_status);
          osp$append_status_parameter (osc$status_parameter_delimiter, text, attribute_validation_status);
        ELSE
          osp$append_status_parameter (',', text, attribute_validation_status);
        IFEND;
        text := osc$null_name;
      IFEND;
    FOREND;

    IF NOT attribute_validation_status.normal THEN
      status := attribute_validation_status;
      RETURN; {----->
    IFEND;

    fmp$change_file_attributes (file_attributes^, evaluated_file_reference, caller_id.ring, open_changed_file,
          status);

  PROCEND bap$change_file_attributes;

MODEND bam$file_structure_functions;
