
  PROCEDURE [INLINE] fsp$determine_access_modes
    (    job_environment_information_p: ^fst$job_environment_information;
         file_object_p: ^fst$goi_object;
     VAR access_modes: pft$usage_selections;
     VAR access_modes_source: amc$undefined_attribute .. amc$access_method_default);

?? PUSH (LISTEXT := ON) ??
    VAR
      status: ost$status,
      usage_option: pft$usage_options,
      usage_selections: pft$usage_selections;

    IF job_environment_information_p <> NIL THEN
      IF (job_environment_information_p^.attachment_options_sources.access_modes_source =
            amc$file_command) OR (job_environment_information_p^.attachment_options_sources.
            access_modes_source = amc$file_request) THEN
        #UNCHECKED_CONVERSION (job_environment_information_p^.setfa_access_modes, access_modes);
        access_modes_source := job_environment_information_p^.attachment_options_sources.access_modes_source;
        RETURN;
      ELSEIF job_environment_information_p^.cycle_attached THEN
        #UNCHECKED_CONVERSION (job_environment_information_p^.attached_access_modes, access_modes);
        access_modes_source := job_environment_information_p^.attachment_options_sources.access_modes_source;
        RETURN;
      IFEND;
    IFEND;

    IF (file_object_p <> NIL) AND (file_object_p^.applicable_file_permit <> NIL) THEN
      access_modes := $pft$usage_selections [];
      FOR usage_option := LOWERVALUE (pft$usage_options) TO UPPERVALUE (pft$usage_options) DO
        IF usage_option IN file_object_p^.applicable_file_permit^.usage_permissions THEN
          access_modes := access_modes + $pft$usage_selections [usage_option];
        IFEND;
      FOREND;
      access_modes_source := fmv$system_file_attributes.dynamic_label.access_mode_source;
    ELSE
      access_modes := fmv$system_file_attributes.dynamic_label.access_mode;
      access_modes_source := fmv$system_file_attributes.dynamic_label.access_mode_source;
    IFEND;

  PROCEND fsp$determine_access_modes;

*copyc fmv$system_file_attributes
*copyc osd$virtual_address
*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$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 amc$mau_length
*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 ost$status
*copyc fst$goi_object
*copyc fst$job_environment_information
*copyc pft$usage_selections
?? POP ??
