?? NEWTITLE := 'NOS/VE : Basic Access Methods : get default attributes' ??
MODULE bam$get_default_attributes;
?? RIGHT := 110 ??

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc osd$default_pragmats
*copyc bat$static_label_attributes
*copyc fst$catalog_information
*copyc fst$cycle_attribute_sources
*copyc fst$cycle_attribute_values
*copyc fst$retention
*copyc ost$status
?? POP ??
*copyc fsp$convert_to_new_contents
*copyc fmv$default_file_attributes
*copyc fmv$system_file_attributes
?? OLDTITLE ??
?? NEWTITLE := 'PROCEDURE bap$get_default_attributes', EJECT ??

*copyc bah$get_default_attributes

  PROCEDURE [XDCL, #GATE] bap$get_default_attributes
    (    catalog_information: ^fst$catalog_information;
         cycle_attribute_sources: ^fst$cycle_attribute_sources;
         cycle_attribute_values: ^fst$cycle_attribute_values;
     VAR status: ost$status);

    VAR
      default_attributes_p: ^bat$static_label_attributes,
      ignore_truncation: boolean;

    status.normal := TRUE;

    IF fmv$default_file_attributes = NIL THEN
      default_attributes_p := ^fmv$system_file_attributes.static_label;
    ELSE
      default_attributes_p := fmv$default_file_attributes;
    IFEND;

    IF cycle_attribute_values <> NIL THEN
      cycle_attribute_values^.average_record_length := default_attributes_p^.average_record_length;
      cycle_attribute_values^.block_type := default_attributes_p^.block_type;
      cycle_attribute_values^.character_conversion := default_attributes_p^.character_conversion;
      cycle_attribute_values^.collate_table_name.entry_point := default_attributes_p^.collate_table_name;
      cycle_attribute_values^.collate_table_name.object_library := osc$null_name;
      cycle_attribute_values^.compression_procedure_name.entry_point :=
            fmv$system_file_attributes.static_label.compression_procedure_name.name;
      cycle_attribute_values^.compression_procedure_name.object_library :=
            fmv$system_file_attributes.static_label.compression_procedure_name.object_library;
      cycle_attribute_values^.data_padding := default_attributes_p^.data_padding;
      cycle_attribute_values^.dynamic_home_block_space := default_attributes_p^.dynamic_home_block_space;
      cycle_attribute_values^.embedded_key := default_attributes_p^.embedded_key;
      cycle_attribute_values^.estimated_record_count := default_attributes_p^.estimated_record_count;
      cycle_attribute_values^.file_access_procedure_name.entry_point :=
            default_attributes_p^.file_access_procedure;
      cycle_attribute_values^.file_access_procedure_name.object_library := osc$null_name;
      fsp$convert_to_new_contents (default_attributes_p^.file_contents, default_attributes_p^.file_structure,
            cycle_attribute_values^.file_contents, ignore_truncation);
      cycle_attribute_values^.file_contents := default_attributes_p^.file_contents;
      cycle_attribute_values^.file_processor := default_attributes_p^.file_processor;
      cycle_attribute_values^.file_label_type := default_attributes_p^.label_type;
      cycle_attribute_values^.file_organization := default_attributes_p^.file_organization;
      cycle_attribute_values^.forced_write := default_attributes_p^.forced_write;
      cycle_attribute_values^.hashing_procedure_name.entry_point :=
            default_attributes_p^.hashing_procedure_name.name;
      cycle_attribute_values^.hashing_procedure_name.object_library :=
            fmv$system_file_attributes.static_label.hashing_procedure_name.object_library;
      cycle_attribute_values^.index_levels := default_attributes_p^.index_levels;
      cycle_attribute_values^.index_padding := default_attributes_p^.index_padding;
      cycle_attribute_values^.initial_home_block_count := default_attributes_p^.initial_home_block_count;
      cycle_attribute_values^.internal_code := default_attributes_p^.internal_code;
      cycle_attribute_values^.key_length := default_attributes_p^.key_length;
      cycle_attribute_values^.key_position := default_attributes_p^.key_position;
      cycle_attribute_values^.key_type := default_attributes_p^.key_type;
      cycle_attribute_values^.line_number := default_attributes_p^.line_number;
      cycle_attribute_values^.loading_factor := default_attributes_p^.loading_factor;
      cycle_attribute_values^.lock_expiration_time := default_attributes_p^.lock_expiration_time;
      cycle_attribute_values^.log_residence := default_attributes_p^.log_residence;
      cycle_attribute_values^.logging_options := default_attributes_p^.logging_options;
      cycle_attribute_values^.max_block_length := default_attributes_p^.max_block_length;
      cycle_attribute_values^.max_record_length := default_attributes_p^.max_record_length;
      cycle_attribute_values^.min_block_length := default_attributes_p^.min_block_length;
      cycle_attribute_values^.min_record_length := default_attributes_p^.min_record_length;
      cycle_attribute_values^.padding_character := default_attributes_p^.padding_character;
      cycle_attribute_values^.page_format := default_attributes_p^.page_format;
      cycle_attribute_values^.page_length := default_attributes_p^.page_length;
      cycle_attribute_values^.page_width := default_attributes_p^.page_width;
      cycle_attribute_values^.record_delimiting_character :=
            default_attributes_p^.record_delimiting_character;
      cycle_attribute_values^.record_limit := default_attributes_p^.record_limit;
      cycle_attribute_values^.record_type := default_attributes_p^.record_type;
      cycle_attribute_values^.records_per_block := default_attributes_p^.records_per_block;
      cycle_attribute_values^.statement_identifier := default_attributes_p^.statement_identifier;
      cycle_attribute_values^.user_information := default_attributes_p^.user_info;
      cycle_attribute_values^.vertical_print_density := default_attributes_p^.vertical_print_density;
    IFEND; {attribute values requested}

    IF cycle_attribute_sources <> NIL THEN
      cycle_attribute_sources^.average_record_length := default_attributes_p^.average_record_length_source;
      cycle_attribute_sources^.block_type := default_attributes_p^.block_type_source;
      cycle_attribute_sources^.character_conversion := default_attributes_p^.character_conversion_source;
      cycle_attribute_sources^.collate_table_name := default_attributes_p^.collate_table_name_source;
      cycle_attribute_sources^.compression_procedure_name :=
            default_attributes_p^.compression_proc_name_source;
      cycle_attribute_sources^.data_padding := default_attributes_p^.data_padding_source;
      cycle_attribute_sources^.dynamic_home_block_space :=
            default_attributes_p^.dynamic_home_block_space_source;
      cycle_attribute_sources^.embedded_key := default_attributes_p^.embedded_key_source;
      cycle_attribute_sources^.estimated_record_count := default_attributes_p^.estimated_record_count_source;
      cycle_attribute_sources^.file_access_procedure_name :=
            default_attributes_p^.file_access_procedure_source;
      cycle_attribute_sources^.file_contents := default_attributes_p^.file_contents_source;
      cycle_attribute_sources^.file_processor := default_attributes_p^.file_processor_source;
      cycle_attribute_sources^.file_label_type := default_attributes_p^.label_type_source;
      cycle_attribute_sources^.file_organization := default_attributes_p^.file_organization_source;
      cycle_attribute_sources^.forced_write := default_attributes_p^.forced_write_source;
      cycle_attribute_sources^.hashing_procedure_name := default_attributes_p^.hashing_procedure_name_source;
      cycle_attribute_sources^.index_levels := default_attributes_p^.index_levels_source;
      cycle_attribute_sources^.index_padding := default_attributes_p^.index_padding_source;
      cycle_attribute_sources^.initial_home_block_count :=
            default_attributes_p^.initial_home_block_count_source;
      cycle_attribute_sources^.internal_code := default_attributes_p^.internal_code_source;
      cycle_attribute_sources^.key_length := default_attributes_p^.key_length_source;
      cycle_attribute_sources^.key_position := default_attributes_p^.key_position_source;
      cycle_attribute_sources^.key_type := default_attributes_p^.key_type_source;
      cycle_attribute_sources^.line_number := default_attributes_p^.line_number_source;
      cycle_attribute_sources^.loading_factor := default_attributes_p^.loading_factor_source;
      cycle_attribute_sources^.lock_expiration_time := default_attributes_p^.lock_expiration_time_source;
      cycle_attribute_sources^.log_residence := default_attributes_p^.log_residence_source;
      cycle_attribute_sources^.logging_options := default_attributes_p^.logging_options_source;
      cycle_attribute_sources^.max_block_length := default_attributes_p^.max_block_length_source;
      cycle_attribute_sources^.max_record_length := default_attributes_p^.max_record_length_source;
      cycle_attribute_sources^.min_block_length := default_attributes_p^.min_block_length_source;
      cycle_attribute_sources^.min_record_length := default_attributes_p^.min_record_length_source;
      cycle_attribute_sources^.padding_character := default_attributes_p^.padding_character_source;
      cycle_attribute_sources^.page_format := default_attributes_p^.page_format_source;
      cycle_attribute_sources^.page_length := default_attributes_p^.page_length_source;
      cycle_attribute_sources^.page_width := default_attributes_p^.page_width_source;
      cycle_attribute_sources^.record_delimiting_character :=
            default_attributes_p^.record_delimiting_char_source;
      cycle_attribute_sources^.record_limit := default_attributes_p^.record_limit_source;
      cycle_attribute_sources^.record_type := default_attributes_p^.record_type_source;
      cycle_attribute_sources^.records_per_block := default_attributes_p^.records_per_block_source;
      cycle_attribute_sources^.statement_identifier := default_attributes_p^.statement_identifier_source;
      cycle_attribute_sources^.user_information := default_attributes_p^.user_info_source;
      cycle_attribute_sources^.vertical_print_density := default_attributes_p^.vertical_print_density_source;
    IFEND; {attribute_sources_requested}

    IF catalog_information <> NIL THEN
      catalog_information^.cycle_registration.erase_at_deletion := default_attributes_p^.clear_space;
      catalog_information^.cycle_registration.size_limit := default_attributes_p^.file_limit;
      catalog_information^.cycle_registration.preset_value := default_attributes_p^.preset_value;
      catalog_information^.cycle_registration.ring_attributes := default_attributes_p^.ring_attributes;
    IFEND; {catalog_information_requested}

  PROCEND bap$get_default_attributes;
?? OLDTITLE ??
?? NEWTITLE := 'PROCEDURE bap$get_default_file_attribs' ??

  PROCEDURE [XDCL, #GATE] bap$get_default_file_attribs
    (VAR default_attributes: bat$static_label_attributes;
     VAR default_new_retention_specified: boolean;
     VAR default_new_retention: fst$retention;
     VAR status: ost$status);

    status.normal := TRUE;

    IF fmv$default_file_attributes = NIL THEN
      default_attributes := fmv$system_file_attributes.static_label;
    ELSE
      default_attributes := fmv$default_file_attributes^;
    IFEND;

    IF fmv$default_new_retention = NIL THEN
      default_new_retention_specified := FALSE;
    ELSE
      default_new_retention_specified := TRUE;
      default_new_retention := fmv$default_new_retention^;
    IFEND;

  PROCEND bap$get_default_file_attribs;
?? OLDTITLE ??
MODEND bam$get_default_attributes;
