?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE : Basic Access Methods : Table Displays' ??

MODULE bam$display_tables;

{  PURPOSE:
{    This module contains procedures called by amp$display_bam_tables and
{    the amm$trace_routines.
{    These procedures display the BAM tables symbolically.
{
{  DESIGN:
{    The XDCLed procedures set up what is to be displayed and call internal
{    procedures to do the displaying.  Each internal procedure is passed
{    the record (or a pointer to it) that is to be displayed and the column
{    (indention) at which the display should start.

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc ame$improper_file_id
*copyc amt$file_reference
*copyc bat$task_file_table
*copyc bat$display_tables_indention
*copyc cyc$max_string_size
*copyc fmc$cycle_table_allocation_size
*copyc fmc$entry_assigned
*copyc fmc$number_of_init_cycle_descs
*copyc fmc$number_of_init_path_descs
*copyc fmc$path_table_allocation_size
*copyc fmc$pde_unique_identifier
*copyc fme$file_management_errors
*copyc fmt$cd_attachment_options
*copyc fmt$cycle_description
*copyc fmt$cycle_description_unit
*copyc fmt$path_description_entry
*copyc fmt$path_description_unit
*copyc fmt$path_element_type
*copyc fmt$path_handle
*copyc fmt$static_label_header
*copyc fsc$local
*copyc fsc$max_path_elements
*copyc fst$path
*copyc fst$path_handle_name
*copyc fst$path_table_expansion_limit
*copyc osd$integer_limits
*copyc osd$random_name
*copyc oss$job_paged_literal
*copyc oss$task_private
*copyc ost$status
?? POP ??
*copyc amp$put_next
*copyc bap$get_default_file_attribs
*copyc bap$validate_file_identifier
*copyc clp$construct_path_handle_name
*copyc clp$convert_integer_to_string
*copyc clp$trimmed_string_size
*copyc clp$validate_local_file_name
*copyc clp$validate_name
*copyc fmp$locate_pde_via_path_handle
*copyc fsp$expand_file_label
*copyc osp$set_status_abnormal
*copyc osp$randomize_name
*copyc pmp$convert_binary_unique_name

*copyc amv$access_level_names
*copyc amv$block_type_names
*copyc amv$device_class_names
*copyc amv$file_organization_names
*copyc amv$record_type_names
*copyc amv$usage_option_names
*copyc bav$auxilliary_request_table
*copyc bav$last_art_entry
*copyc bav$last_tft_entry
*copyc bav$task_file_table
*copyc bav$tft_entry_assignment
*copyc fmv$highest_pdu_offset
*copyc fmv$initial_cdu_pointer
*copyc fmv$initial_pdu_pointer
*copyc fmv$path_table_entry_point
*copyc fmv$path_table_statistics
*copyc fmv$pde_assignment_counter

?? TITLE := 'Global Declarations Declared by This Module', EJECT ??

  CONST
    title_length = 78;

  VAR
    bav$trace_file_open: [STATIC, oss$task_private] boolean := FALSE,
    bav$trace_file_id: [STATIC, oss$task_private] amt$file_identifier;

  VAR
    bav$file_positions: [XDCL, #GATE, READ, oss$job_paged_literal] array [amt$file_position] of string (3) :=
          ['BOI', 'BOP', 'MID', 'EOR', 'EOP', 'EOI', 'EOK'];

{The following two routines are used in AMM$TRACE_ROUTINES}
?? TITLE := 'PROCEDURE [XDCL, #GATE] bap$fetch_trace_control', EJECT ??

  PROCEDURE [XDCL, #GATE] bap$fetch_trace_control
    (VAR trace_file_open: boolean;
     VAR trace_file_id: amt$file_identifier);

    trace_file_open := bav$trace_file_open;
    trace_file_id := bav$trace_file_id;

  PROCEND bap$fetch_trace_control;

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

  PROCEDURE [XDCL, #GATE] bap$store_trace_control
    (    trace_file_open: boolean;
         trace_file_id: amt$file_identifier);

    bav$trace_file_open := trace_file_open;
    bav$trace_file_id := trace_file_id;

  PROCEND bap$store_trace_control;

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

  PROCEDURE [XDCL, #GATE] bap$display_art
    (    output_fid: amt$file_identifier;
     VAR status: ost$status);

    VAR
      art_descriptor: bat$art_descriptor,
      ba: amt$file_byte_address,
      entry_found: boolean,
      entry_number: bat$tft_limit,
      indent: bat$display_tables_indention,
      output_length: integer,
      output_string: string (bat$display_tables_str_length);

    status.normal := TRUE;

    display_title (output_fid, 'AUXILIARY_REQUEST_TABLE', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    entry_found := FALSE;
    indent := 5;
    FOR entry_number := 1 TO bav$last_art_entry DO

      art_descriptor := bav$auxilliary_request_table^ [entry_number];
      IF art_descriptor.local_file_name <> osc$null_name THEN

        entry_found := TRUE;
        STRINGREP (output_string, output_length, '-', 'AUXILIARY_REQUEST_TABLE_ENTRY : ', entry_number);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        STRINGREP (output_string, output_length, ' ': indent, 'local_file_name : ',
              art_descriptor.local_file_name);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        STRINGREP (output_string, output_length, ' ': indent, 'file_attributes : ',
              art_descriptor.file_attributes);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

      IFEND;

    FOREND;

    IF NOT entry_found THEN
      STRINGREP (output_string, output_length, ' ': indent, 'NO ENTRIES FOUND');
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

  PROCEND bap$display_art;

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

  PROCEDURE [XDCL, #GATE] bap$display_files
    (    output_fid: amt$file_identifier;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      entry: 1 .. cyc$max_string_size,
      output_length: integer,
      output_path: string (fsc$max_path_size + 8),
      output_string: string (bat$display_tables_str_length),
      path: fst$path,
      path_handle: fmt$path_handle,
      path_handle_name: amt$local_file_name,
      path_length: fst$path_size,
      pde: ^fmt$path_description_entry,
      pdu: ^fmt$path_description_unit,
      temp_pde: ^fmt$path_description_entry;

    status.normal := TRUE;

    { get pointer first entry in the first path_description_unit }
    pdu := fmv$initial_pdu_pointer;

    display_title (output_fid, 'FILES IN PATH TABLE', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    WHILE pdu <> NIL DO

      { look at every assigned entry in a path_description_unit }
      FOR entry := 1 TO #SIZE (pdu^.entry_assignment^) DO
        IF pdu^.entry_assignment^ (entry) = fmc$entry_assigned THEN
          pde := ^pdu^.entries^ [entry];
          IF (pde^.entry_type = fmc$file_cycle_object) AND (pde^.cycle_description <> NIL) THEN
            get_path (pde, path, path_length, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;

            STRINGREP (output_path, output_length, ' path = ', path (1, path_length));
            amp$put_next (output_fid, ^output_path, output_length, ba, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
            { create a path_handle_name for the cycle_object }
            path_handle := pde^.cycle_description^.path_handle;
            clp$construct_path_handle_name (path_handle, path_handle_name);
            STRINGREP (output_string, output_length, ' ': 5, 'attached = ',
                  pde^.cycle_description^.attached_file, '    path_handle_name = ',
                  path_handle_name (1, clp$trimmed_string_size (path_handle_name)));
            amp$put_next (output_fid, ^output_string, output_length, ba, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
            temp_pde := pde^.first_cycle_alias_entry;
            WHILE temp_pde <> NIL DO
              { create a path_handle_name for the alias }
              path_handle.segment_offset := #OFFSET (temp_pde);
              path_handle.assignment_counter := temp_pde^.entry_assignment_counter;
              path_handle.open_position.specified := FALSE;
              clp$construct_path_handle_name (path_handle, path_handle_name);
              STRINGREP (output_string, output_length, ' ': 9, 'alias = ', temp_pde^.path_node_name.value,
                    ' phn = ', path_handle_name (1, clp$trimmed_string_size (path_handle_name)));
              amp$put_next (output_fid, ^output_string, output_length, ba, status);
              IF NOT status.normal THEN
                RETURN;
              IFEND;
              temp_pde := temp_pde^.next_cycle_alias_entry;
            WHILEND;
          IFEND;
        IFEND;
      FOREND;

      { move on to next unit if pointer is not NIL}
      pdu := pdu^.next_path_description_unit;
    WHILEND;

  PROCEND bap$display_files;

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

  PROCEDURE [XDCL, #GATE] bap$display_path_table
    (    output_fid: amt$file_identifier;
         expansion_limit: fst$path_table_expansion_limit;
     VAR status: ost$status);

    CONST
      entry_assignment_display_size = 50;

    VAR
      ba: amt$file_byte_address,
      i: integer,
      indent: bat$display_tables_indention,
      output_length: integer,
      output_string: string (bat$display_tables_str_length),
      pde: ^fmt$path_description_entry,
      pdu: ^fmt$path_description_unit,
      unit: integer;

    status.normal := TRUE;

    display_title (output_fid, 'PATH TABLE', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    indent := 5;
    unit := 1;
    pdu := fmv$initial_pdu_pointer;

    REPEAT
      IF unit = 1 THEN
        STRINGREP (output_string, output_length, ' ', 'PATH_DESCRIPTION_UNIT : ', pdu, '   UNIT # : ',
              unit: 4);
      ELSE
        STRINGREP (output_string, output_length, '1', 'PATH_DESCRIPTION_UNIT : ', pdu, '   UNIT # : ',
              unit: 4);
      IFEND;
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, 'next_path_description_unit : ',
            pdu^.next_path_description_unit);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, 'total_count : ', pdu^.total_count);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, 'current_count : ', pdu^.current_count);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, '                   ',
            '         11111111112222222222333333333344444444445');
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, '                   ',
            '12345678901234567890123456789012345678901234567890');
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      i := 0;
      WHILE i < ((#SIZE (pdu^.entry_assignment^) - 1) DIV entry_assignment_display_size) DO
        i := i + 1;
        STRINGREP (output_string, output_length, ' ': indent, 'entry_assignment : ', pdu^.
              entry_assignment^ (((i - 1) * entry_assignment_display_size + 1),
              entry_assignment_display_size));
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      WHILEND;

      STRINGREP (output_string, output_length, ' ': indent, 'entry_assignment : ', pdu^.
            entry_assignment^ ((i * entry_assignment_display_size + 1), * ));
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      FOR i := 1 TO #SIZE (pdu^.entry_assignment^) DO
        IF pdu^.entry_assignment^ (i) = fmc$entry_assigned THEN
          pde := ^pdu^.entries^ [i];
          STRINGREP (output_string, output_length, '-', ' ': indent - 1, 'PATH_DESCRIPTION_ENTRY : ', pde,
                '   ENTRY # : ', i, '   UNIT # : ', unit: 4);
          amp$put_next (output_fid, ^output_string, output_length, ba, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;

          display_pde (output_fid, pde, expansion_limit, indent + 4, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        IFEND
      FOREND;
      unit := unit + 1;
      pdu := pdu^.next_path_description_unit;
    UNTIL pdu = NIL;

  PROCEND bap$display_path_table;

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

  PROCEDURE [XDCL, #GATE] bap$display_pde_via_ph
    (    output_fid: amt$file_identifier;
         path_handle: fmt$path_handle;
         expansion_limit: fst$path_table_expansion_limit;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      indent: bat$display_tables_indention,
      original_pde: ^fmt$path_description_entry,
      output_length: integer,
      output_path: string (fsc$max_path_size + 8),
      output_string: string (bat$display_tables_str_length),
      path: fst$path,
      path_length: fst$path_size,
      pde: ^fmt$path_description_entry;

    status.normal := TRUE;

    display_title (output_fid, 'PATH DESCRIPTION ENTRY', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    fmp$locate_pde_via_path_handle (path_handle, pde, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    original_pde := pde;

    get_path (pde, path, path_length, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_path, output_length, ' path = ', path (1, path_length));
    amp$put_next (output_fid, ^output_path, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    indent := 5;
    STRINGREP (output_string, output_length, '-', 'PATH_DESCRIPTION_ENTRY : ', pde);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    display_pde (output_fid, pde, expansion_limit, indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    { display back up full path }
    WHILE pde^.parental_path_entry <> NIL DO
      pde := pde^.parental_path_entry;
      STRINGREP (output_string, output_length, '-', 'PARENT PATH_DESCRIPTION_ENTRY : ', pde);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      display_pde (output_fid, pde, expansion_limit, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    WHILEND;

    IF (original_pde^.entry_type = fmc$file_cycle_object) AND
          (original_pde^.first_cycle_alias_entry <> NIL) THEN

      pde := original_pde^.first_cycle_alias_entry;
      WHILE pde <> NIL DO
        STRINGREP (output_string, output_length, '-', 'ALIAS PATH_DESCRIPTION_ENTRY : ', pde);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        display_pde (output_fid, pde, expansion_limit, indent, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        pde := pde^.next_cycle_alias_entry;
      WHILEND;
    IFEND; {cycle_object}

  PROCEND bap$display_pde_via_ph;

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

  PROCEDURE [XDCL, #GATE] bap$display_pt_stats
    (    output_fid: amt$file_identifier;
     VAR status: ost$status);

    CONST
      number_of_empty_node_statistics = 7;

    VAR
      ba: amt$file_byte_address,
      empty_node_depths: integer,
      first_x_empty_node_depths: array [1 .. number_of_empty_node_statistics] of integer,
      indent: bat$display_tables_indention,
      number_of_empty_nodes: integer,
      number_of_tree_nodes: integer,
      output_length: integer,
      output_string: string (bat$display_tables_str_length),
      previous_randomized_name: ost$randomized_name,
      tree_depth: integer,
      tree_node_depths: integer,
      unused_externalized_entry_count: integer,
      unused_externalized_path_count: integer,
      unused_not_externalized_count: integer;

    PROCEDURE count_unused_paths
      (VAR unused_path_count: integer;
       VAR unused_externalized_entry_count: integer;
       VAR unused_externalized_path_count: integer;
       VAR unused_not_externalized_count: integer;
       VAR status: ost$status);

      VAR
        entry: 1 .. cyc$max_string_size,
        output_path: string (fsc$max_path_size + 8),
        path: fst$path,
        path_externalized: boolean,
        path_length: fst$path_size,
        pde: ^fmt$path_description_entry,
        pdu: ^fmt$path_description_unit;

      status.normal := TRUE;
      unused_path_count := 0;
      unused_externalized_entry_count := 0;
      unused_externalized_path_count := 0;
      unused_not_externalized_count := 0;

      pdu := fmv$initial_pdu_pointer;
      WHILE pdu <> NIL DO

        { look at every assigned entry in a path_description_unit }
        FOR entry := 1 TO #SIZE (pdu^.entry_assignment^) DO
          IF pdu^.entry_assignment^ (entry) = fmc$entry_assigned THEN
            pde := ^pdu^.entries^ [entry];
            IF ((pde^.entry_type = fmc$file_cycle_object) AND (pde^.cycle_description = NIL)) OR
                  ((pde^.entry_type = fmc$named_object) AND (pde^.active_path_participation_count = 0) AND
                  (pde^.highest_cycle = NIL)) THEN
              unused_path_count := unused_path_count + 1;
              IF pde^.path_handle_name_externalized THEN
                path_externalized := TRUE;
                unused_externalized_entry_count := unused_externalized_entry_count + 1;
              ELSE
                path_externalized := FALSE;
                unused_not_externalized_count := unused_not_externalized_count + 1;
              IFEND;
              pde := pde^.parental_path_entry;
              WHILE pde <> NIL DO
                IF pde^.active_path_participation_count = 1 THEN
                  IF pde^.path_handle_name_externalized THEN
                    unused_externalized_entry_count := unused_externalized_entry_count + 1;
                  ELSEIF path_externalized THEN
                    unused_externalized_path_count := unused_externalized_path_count + 1;
                  ELSE
                    unused_not_externalized_count := unused_not_externalized_count + 1;
                  IFEND;
                IFEND;
                pde := pde^.parental_path_entry;
              WHILEND;
            IFEND; {end of a path}
          IFEND; {assigned}
        FOREND;

        { move on to next unit if pointer is not NIL}
        pdu := pdu^.next_path_description_unit;
      WHILEND;
    PROCEND count_unused_paths;

    PROCEDURE find_file_entry
      (    parent_pde: ^fmt$path_description_entry;
       VAR file_entry_found: boolean;
       VAR path_externalized: boolean;
       VAR status: ost$status);

      PROCEDURE find_cycle_description
        (    pde: ^fmt$path_description_entry;
         VAR cycle_description_found: boolean;
         VAR path_externalized: {i/o} boolean;
         VAR status: ost$status);

        VAR
          cycle_pde: ^fmt$path_description_entry;

        status.normal := TRUE;

        cycle_description_found := FALSE;
        cycle_pde := pde^.highest_cycle;

        WHILE cycle_pde <> NIL DO
          IF (cycle_pde^.entry_assignment^ = fmc$entry_assigned) AND
                (cycle_pde^.entry_type = fmc$file_cycle_object) THEN
            IF (cycle_pde^.cycle_description <> NIL) THEN
              cycle_description_found := TRUE;
            ELSE
              IF cycle_pde^.path_handle_name_externalized THEN
                path_externalized := TRUE;
                unused_externalized_entry_count := unused_externalized_entry_count + 1;
              ELSE
                unused_not_externalized_count := unused_not_externalized_count + 1;
              IFEND;
            IFEND;
            cycle_pde := cycle_pde^.next_lower_cycle;
          ELSE
            STRINGREP (output_string, output_length, ' ': indent,
                  'PATH_DESCRIPTION_ENTRY is not an ASSIGNED - FILE_CYCLE_OBJECT : ', cycle_pde);
            amp$put_next (output_fid, ^output_string, output_length, ba, status);
            cycle_pde := NIL;
          IFEND;
        WHILEND;

      PROCEND find_cycle_description;

      VAR
        child_node_count: integer,
        cycle_description_found: boolean,
        cycle_pde: ^fmt$path_description_entry,
        entry: 1 .. cyc$max_string_size,
        local_file_entry_found: boolean,
        local_path_externalized: boolean,
        number_of_cycle_objects: integer,
        pde: ^fmt$path_description_entry,
        pdu: ^fmt$path_description_unit;

      status.normal := TRUE;

      file_entry_found := FALSE;
      path_externalized := FALSE;
      child_node_count := 0;
      pdu := fmv$initial_pdu_pointer;

      WHILE pdu <> NIL DO
        FOR entry := 1 TO #SIZE (pdu^.entry_assignment^) DO
          IF pdu^.entry_assignment^ (entry) = fmc$entry_assigned THEN
            pde := ^pdu^.entries^ [entry];
            IF (pde^.entry_type = fmc$named_object) AND (pde^.parental_path_entry = parent_pde) THEN
              child_node_count := child_node_count + 1;
              local_file_entry_found := FALSE;
              local_path_externalized := FALSE;
              IF pde^.active_path_participation_count > 0 THEN
{
{ The following code checks for a named object hung off the current object as well as a cycle object.
{ This is due to the fact that a permanent file catalog could have a cycle object hung off of it
{ because of the fact that paths are recorded before they are verified.
{
                number_of_cycle_objects := 0;
                cycle_pde := pde^.highest_cycle;
                WHILE cycle_pde <> NIL DO
                  number_of_cycle_objects := number_of_cycle_objects + 1;
                  cycle_pde := cycle_pde^.next_lower_cycle;
                WHILEND;
                IF pde^.active_path_participation_count > number_of_cycle_objects THEN
                  find_file_entry (pde, local_file_entry_found, local_path_externalized, status);
                  IF NOT status.normal THEN
                    RETURN;
                  IFEND;
                IFEND;
                find_cycle_description (pde, cycle_description_found, local_path_externalized, status);
                IF NOT status.normal THEN
                  RETURN;
                IFEND;
                local_file_entry_found := local_file_entry_found OR cycle_description_found;
              ELSEIF pde^.highest_cycle <> NIL THEN {ALIAS
                local_file_entry_found := TRUE;
              IFEND;
              IF NOT local_file_entry_found THEN
                IF pde^.path_handle_name_externalized THEN
                  unused_externalized_entry_count := unused_externalized_entry_count + 1;
                ELSEIF local_path_externalized THEN
                  unused_externalized_path_count := unused_externalized_path_count + 1;
                ELSE
                  unused_not_externalized_count := unused_not_externalized_count + 1;
                IFEND;
              IFEND;
              path_externalized := path_externalized OR local_path_externalized OR
                    pde^.path_handle_name_externalized;
              file_entry_found := file_entry_found OR local_file_entry_found;
              IF (parent_pde <> NIL) AND (child_node_count = parent_pde^.active_path_participation_count) THEN
                RETURN;
              IFEND;
            IFEND; {parental_path_entry = parent_pde.
          IFEND;
        FOREND;
        pdu := pdu^.next_path_description_unit;
      WHILEND;

    PROCEND find_file_entry;

    PROCEDURE traverse_path_table
      (    pde: ^fmt$path_description_entry;
           depth: integer;
       VAR status: ost$status);

      VAR
        i: integer,
        insert_index: integer;

      status.normal := TRUE;

      IF (pde <> NIL) THEN
        number_of_tree_nodes := number_of_tree_nodes + 1;
        tree_node_depths := tree_node_depths + depth;
        IF depth > tree_depth THEN
          tree_depth := depth;
        IFEND;
        IF pde^.entry_assignment^ = fmc$entry_assigned THEN
          IF pde^.entry_type = fmc$named_object THEN
            traverse_path_table (pde^.left_subtree, depth + 1, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
            IF pde^.randomized_node_name < previous_randomized_name THEN
              STRINGREP (output_string, output_length, ' ': indent,
                    'PATH_DESCRIPTION_ENTRY in tree is out of order : ', pde);
              amp$put_next (output_fid, ^output_string, output_length, ba, status);
              IF NOT status.normal THEN
                RETURN;
              IFEND;
            IFEND;
            previous_randomized_name := pde^.randomized_node_name;
            traverse_path_table (pde^.right_subtree, depth + 1, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
          ELSE
            STRINGREP (output_string, output_length, ' ': indent,
                  'PATH_DESCRIPTION_ENTRY in tree is NOT a NAMED object : ', pde);
            amp$put_next (output_fid, ^output_string, output_length, ba, status);
          IFEND;
        ELSE
          STRINGREP (output_string, output_length, ' ': indent,
                'PATH_DESCRIPTION_ENTRY in tree is not active : ', pde);
          amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IFEND;
      ELSE {pde = NIL
        number_of_empty_nodes := number_of_empty_nodes + 1;
        empty_node_depths := empty_node_depths + depth;
        IF (depth < first_x_empty_node_depths [number_of_empty_node_statistics]) THEN
          insert_index := 1;
          WHILE depth >= first_x_empty_node_depths [insert_index] DO
            insert_index := insert_index + 1;
          WHILEND;
          FOR i := number_of_empty_node_statistics DOWNTO insert_index + 1  DO
            first_x_empty_node_depths [i] := first_x_empty_node_depths [i-1];
          FOREND;
          first_x_empty_node_depths [insert_index] := depth;
        IFEND;
      IFEND;

    PROCEND traverse_path_table;

    VAR
      cdu: ^fmt$cycle_description_unit,
      cdu_number: integer,
      current_count: integer,
      depth: 1 .. fsc$max_path_elements,
      file_entry_found: boolean,
      complete_tree_depth: integer,
      i: integer,
      number_of_named_objects: integer,
      number_of_nodes_in_full_tree: integer,
      path_externalized: boolean,
      pdu: ^fmt$path_description_unit,
      pdu_number: integer,
      unused_path_count: integer;

    status.normal := TRUE;

    display_title (output_fid, 'PATH TABLE STATISTICS', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    indent := 3;

    STRINGREP (output_string, output_length, '  General Statistics:');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    current_count := 0;
    FOR i := 1 to bav$last_art_entry DO
      IF bav$auxilliary_request_table^ [i].local_file_name <> osc$null_name THEN
        current_count := current_count + 1;
      IFEND;
    FOREND;

    IF bav$auxilliary_request_table = NIL THEN
      STRINGREP (output_string, output_length, ' ': indent,
            'Auxiliary Request Table (in use/bav$last_art_entry/size): NOT ALLOCATED');
    ELSE
      STRINGREP (output_string, output_length, ' ': indent,
            'Auxiliary Request Table (in use/bav$last_art_entry/size): ', current_count, '/',
            bav$last_art_entry, '/', UPPERBOUND(bav$auxilliary_request_table^));
    IFEND;
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    current_count := 0;
    FOR i := 1 to bav$last_tft_entry DO
      IF bav$tft_entry_assignment^ (i) = fmc$entry_assigned THEN
        current_count := current_count + 1;
      IFEND;
    FOREND;
    STRINGREP (output_string, output_length, ' ': indent,
          'Task File Table (in use/bav$last_tft_entry/size): ', current_count, '/',
          bav$last_tft_entry, '/', UPPERBOUND(bav$task_file_table^));
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;


    STRINGREP (output_string, output_length, '0 Path Table Object Statistics:');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'path table objects (current/maximum): ',
          (fmv$named_objects_created - fmv$named_objects_deleted + fmv$cycle_objects_created -
          fmv$cycle_objects_deleted), '/', fmv$max_active_objects);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent+2,
          'named objects (current/created/deleted): ',
          (fmv$named_objects_created - fmv$named_objects_deleted), '/', fmv$named_objects_created, '/',
          fmv$named_objects_deleted);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent+2,
          'cycle objects (current/created/deleted): ',
          (fmv$cycle_objects_created - fmv$cycle_objects_deleted), '/', fmv$cycle_objects_created, '/',
          fmv$cycle_objects_deleted);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    count_unused_paths (unused_path_count, unused_externalized_entry_count, unused_externalized_path_count,
          unused_not_externalized_count, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{ This following method is more accurate but also much more time consuming if the # of entries exceeds 5000.

    IF (fmv$named_objects_created - fmv$named_objects_deleted + fmv$cycle_objects_created -
          fmv$cycle_objects_deleted) <= 5000 THEN
      unused_externalized_entry_count := 0;
      unused_externalized_path_count := 0;
      unused_not_externalized_count := 0;
      find_file_entry (NIL, file_entry_found, path_externalized, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent,
          'unused entries (total/externalized/in ext path/not ext): ',
          (unused_externalized_entry_count + unused_externalized_path_count + unused_not_externalized_count),
          '/', unused_externalized_entry_count, '/', unused_externalized_path_count, '/',
          unused_not_externalized_count);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'unused paths: ', unused_path_count);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;


    STRINGREP (output_string, output_length, '0 Tree Structure Statistics:');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    previous_randomized_name := 0;
    number_of_empty_nodes := 0;
    number_of_tree_nodes := 0;
    tree_depth := 0;
    empty_node_depths := 0;
    tree_node_depths := 0;
    FOR i := 1 to number_of_empty_node_statistics DO
      first_x_empty_node_depths [i] := osc$max_integer;
    FOREND;
    traverse_path_table (fmv$path_table_entry_point, 1 {depth} , status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'tree nodes: ', number_of_tree_nodes);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    number_of_nodes_in_full_tree := 1;
    i := 1;
    WHILE (i <= tree_depth) AND (i <= 62) DO
      number_of_nodes_in_full_tree := number_of_nodes_in_full_tree * 2;
      IF number_of_tree_nodes > (number_of_nodes_in_full_tree - 1) THEN
        complete_tree_depth := i + 1;
      IFEND;
      i := i + 1;
    WHILEND;
    number_of_nodes_in_full_tree := number_of_nodes_in_full_tree - 1;
    STRINGREP (output_string, output_length, ' ': indent,
          'depth (tree/complete tree/average empty node/average node): ', tree_depth, '/',
          complete_tree_depth, '/', (empty_node_depths DIV number_of_empty_nodes), '/',
          (tree_node_depths DIV number_of_tree_nodes));
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    IF tree_depth <= 62 THEN
      STRINGREP (output_string, output_length, ' ': indent, 'percentage of full tree of depth', tree_depth,
            ': ', ($REAL (number_of_tree_nodes * 100) / $REAL (number_of_nodes_in_full_tree)): 7: 3, '%');
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'first', number_of_empty_node_statistics,
          ' empty node depths: ');
    FOR i := 1 to number_of_empty_node_statistics DO
      STRINGREP (output_string, output_length, output_string (1, output_length),
            first_x_empty_node_depths [i], ', ');
    FOREND;
    output_length := output_length - 2; {remove last comma & space.
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;


    STRINGREP (output_string, output_length, '0 Path Depth Statistics:');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    depth := 1;
    current_count := 0;
    WHILE ((depth <= fmv$max_path_depth) AND (depth <= fmc$statistics_max_path_depth)) DO
      current_count := current_count + fmv$path_depth_entries [depth];
      depth := depth + 1;
    WHILEND;
    STRINGREP (output_string, output_length, ' ': indent, 'path references: ',
          current_count);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'maximum depth referenced: ', fmv$max_path_depth);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent,
          'path depth frequencies:');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    depth := 1;
    STRINGREP (output_string, output_length, ' ': indent);
    WHILE ((depth < fmv$max_path_depth) AND (depth < fmc$statistics_max_path_depth)) DO
      STRINGREP (output_string, output_length, output_string (1, output_length), '   ', depth: 2, ':',
            fmv$path_depth_entries [depth]: 10);
      IF (depth MOD 4) = 0 THEN
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        STRINGREP (output_string, output_length, ' ': indent);
      IFEND;
      depth := depth + 1;
    WHILEND;
    IF depth = fmv$max_path_depth THEN
      STRINGREP (output_string, output_length, output_string (1, output_length), '   ', depth: 2, ':',
            fmv$path_depth_entries [depth]: 10);
    ELSE
      STRINGREP (output_string, output_length, output_string (1, output_length), '  ', depth: 2, '+:',
            fmv$path_depth_entries [depth]: 10);
    IFEND;
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;


    STRINGREP (output_string, output_length, '0 CDU Statistics:');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent,
          'cycle table size (initial/allocated): ',
          fmc$number_of_init_cycle_descs, '/', fmc$cycle_table_allocation_size);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    cdu := fmv$initial_cdu_pointer;
    cdu_number := 1;
    WHILE cdu <> NIL DO
      current_count := 0;
      FOR i := 1 TO #SIZE (cdu^.entry_assignment^) DO
        IF cdu^.entry_assignment^ (i) = fmc$entry_assigned THEN
          current_count := current_count + 1;
        IFEND;
      FOREND;
      STRINGREP (output_string, output_length, ' ': indent, 'entries in cdu', cdu_number,
            ' (current/created/deleted): ', current_count, '/', cdu^.total_count, '/',
            (cdu^.total_count - current_count));
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      cdu := cdu^.next_cycle_description_unit;
      cdu_number := cdu_number + 1;
    WHILEND;


    STRINGREP (output_string, output_length, '0 PDU Statistics:');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent,
          'fmv$pde_assignment_counter/fmv$highest_pdu_offset: ',
          fmv$pde_assignment_counter: #(16), '(16)/', fmv$highest_pdu_offset: #(16), '(16)');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent,
          'path table size (initial/allocated): ',
          fmc$number_of_init_path_descs, '/', fmc$path_table_allocation_size);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    pdu := fmv$initial_pdu_pointer;
    pdu_number := 1;
    WHILE pdu <> NIL DO
      STRINGREP (output_string, output_length, ' ': indent, 'entries in pdu', pdu_number,
            ' (current/created/deleted): ', pdu^.current_count, '/', pdu^.total_count, '/',
            (pdu^.total_count - pdu^.current_count));
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      pdu := pdu^.next_path_description_unit;
      pdu_number := pdu_number + 1;
    WHILEND;

  PROCEND bap$display_pt_stats;

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

  PROCEDURE [XDCL, #GATE] bap$display_task_file_table
    (    output_fid: amt$file_identifier;
         expand_task_file_table_entry: boolean;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      entry_number: bat$tft_limit,
      name_is_path_handle: boolean,
      name_is_valid: boolean,
      output_length: integer,
      output_path: string (fsc$max_path_size + 8),
      output_string: string (bat$display_tables_str_length),
      path: fst$path,
      path_handle: fmt$path_handle,
      path_handle_name: amt$local_file_name,
      path_length: fst$path_size,
      pde: ^fmt$path_description_entry;

    status.normal := TRUE;

    display_title (output_fid, 'TASK_FILE_TABLE', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    FOR entry_number := 1 TO bav$last_tft_entry DO

      IF bav$tft_entry_assignment^ (entry_number) = fmc$entry_assigned THEN

        STRINGREP (output_string, output_length, '-', 'TASK_FILE_TABLE_ENTRY : ', entry_number);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        clp$validate_local_file_name (bav$task_file_table^ [entry_number].local_file_name, path_handle_name,
              path_handle, name_is_path_handle, name_is_valid);
        IF NOT name_is_path_handle THEN
          STRINGREP (output_string, output_length, ' ', path_handle_name,
                ' is not a valid PATH_HANDLE_NAME.');
          amp$put_next (output_fid, ^output_string, output_length, ba, status);
          RETURN;
        IFEND;

        fmp$locate_pde_via_path_handle (path_handle, pde, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        get_path (pde, path, path_length, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        STRINGREP (output_path, output_length, ' path = ', path (1, path_length));
        amp$put_next (output_fid, ^output_path, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        display_tft_entry (output_fid, ^bav$task_file_table^ [entry_number], expand_task_file_table_entry, 5,
              status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

      IFEND;

    FOREND;

  PROCEND bap$display_task_file_table;

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

  PROCEDURE [XDCL, #GATE] bap$display_tft_entry
    (    output_fid: amt$file_identifier;
         file_identifier: amt$file_identifier;
     VAR status: ost$status);

    CONST
      indent = 6;

    VAR
      ba: amt$file_byte_address,
      output_length: integer,
      output_string: string (bat$display_tables_str_length),
      tft_entry: ^bat$task_file_entry,
      valid_file_id: boolean;

    bap$validate_file_identifier (file_identifier, tft_entry, valid_file_id);
    IF NOT valid_file_id THEN
      osp$set_status_abnormal (amc$access_method_id, ame$improper_file_id, 'BAP$DISPLAY_TFT_ENTRY', status);
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'Task file table entry');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    display_tft_entry (output_fid, tft_entry, TRUE {expand_task_file_table_entry} , indent + 2, status);

  PROCEND bap$display_tft_entry;

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

  PROCEDURE [XDCL, #GATE] bap$display_tfte_via_ph
    (    output_fid: amt$file_identifier;
         path_handle: fmt$path_handle;
         expand_task_file_table_entry: boolean;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      entry_number: bat$tft_limit,
      found_entry: boolean,
      name_is_path_handle: boolean,
      name_is_valid: boolean,
      output_length: integer,
      output_path: string (fsc$max_path_size + 8),
      output_string: string (bat$display_tables_str_length),
      path: fst$path,
      path_handle_name: fst$path_handle_name,
      path_length: fst$path_size,
      pde: ^fmt$path_description_entry,
      valid_name: amt$local_file_name;

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

    display_title (output_fid, 'TASK FILE TABLE ENTRIES', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    fmp$locate_pde_via_path_handle (path_handle, pde, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    get_path (pde, path, path_length, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_path, output_length, ' path = ', path (1, path_length));
    amp$put_next (output_fid, ^output_path, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$construct_path_handle_name (path_handle, path_handle_name);

    FOR entry_number := 1 TO bav$last_tft_entry DO

      IF (bav$tft_entry_assignment^ (entry_number) = fmc$entry_assigned) AND
            (bav$task_file_table^ [entry_number].local_file_name = path_handle_name) THEN

        STRINGREP (output_string, output_length, '-', 'TASK_FILE_TABLE_ENTRY : ', entry_number);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        display_tft_entry (output_fid, ^bav$task_file_table^ [entry_number], expand_task_file_table_entry, 5,
              status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        found_entry := TRUE;
      IFEND;

    FOREND;

    IF NOT found_entry THEN
      STRINGREP (output_string, output_length, ' ', 'NO TASK_FILE_TABLE_ENTRY FOUND FOR PATH_HANDLE_NAME "',
            path_handle_name);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

  PROCEND bap$display_tfte_via_ph;

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

  PROCEDURE [XDCL, #GATE] bap$display_unused_paths
    (    output_fid: amt$file_identifier;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      entry: 1 .. cyc$max_string_size,
      output_length: integer,
      output_string: string (bat$display_tables_str_length),
      output_path: string (fsc$max_path_size + 8),
      path: fst$path,
      path_handle: fmt$path_handle,
      path_handle_name: amt$local_file_name,
      path_length: fst$path_size,
      pde: ^fmt$path_description_entry,
      pdu: ^fmt$path_description_unit;

    status.normal := TRUE;

    { get pointer first entry in the first path_description_unit }
    pdu := fmv$initial_pdu_pointer;

    display_title (output_fid, 'PATH TABLE UNUSED PATHS', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    WHILE pdu <> NIL DO

      { look at every assigned entry in a path_description_unit }
      FOR entry := 1 TO #SIZE (pdu^.entry_assignment^) DO
        IF pdu^.entry_assignment^ (entry) = fmc$entry_assigned THEN
          pde := ^pdu^.entries^ [entry];
          IF ((pde^.entry_type = fmc$file_cycle_object) AND (pde^.cycle_description = NIL)) OR
                ((pde^.entry_type = fmc$named_object) AND (pde^.active_path_participation_count = 0) AND
                (pde^.highest_cycle = NIL)) THEN
            get_path (pde, path, path_length, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;

            STRINGREP (output_path, output_length, ' path = ', path (1, path_length));
            amp$put_next (output_fid, ^output_path, output_length, ba, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;

            path_handle.segment_offset := #OFFSET (pde);
            path_handle.assignment_counter := pde^.entry_assignment_counter;
            path_handle.open_position.specified := FALSE;
            clp$construct_path_handle_name (path_handle, path_handle_name);
            STRINGREP (output_string, output_length, ' ': 5, 'externalized = ',
                  pde^.path_handle_name_externalized, '    path_handle_name = ',
                  path_handle_name (1, clp$trimmed_string_size (path_handle_name)));
            amp$put_next (output_fid, ^output_string, output_length, ba, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;

          IFEND; {end of a path}
        IFEND; {assigned}
      FOREND;

      { move on to next unit if pointer is not NIL}
      pdu := pdu^.next_path_description_unit;
    WHILEND;

  PROCEND bap$display_unused_paths;

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

  PROCEDURE [XDCL, #GATE] bap$validate_path_table_objects
    (    output_fid: amt$file_identifier;
     VAR status: ost$status);

    CONST
      indent = 5;

    VAR
      ba: amt$file_byte_address,
      i: integer,
      output_length: integer,
      output_string: string (bat$display_tables_str_length),
      error_found: boolean,
      found: boolean,
      number_of_cycle_objects: integer,
      number_of_named_objects: integer,
      pde: ^fmt$path_description_entry,
      pdu: ^fmt$path_description_unit,
      temp_pde: ^fmt$path_description_entry;

    PROCEDURE display_tree_error
      (    error_text: string ( * );
           pde1_description: string ( * );
           pde1: ^fmt$path_description_entry;
           pde2_description: string ( * );
           pde2: ^fmt$path_description_entry;
       VAR status: ost$status);

      status.normal := TRUE;
      error_found := TRUE;

      STRINGREP (output_string, output_length, '-', error_text);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      IF STRLENGTH (pde1_description) > 0 THEN
        STRINGREP (output_string, output_length, ' ': indent, pde1_description, ' : ', pde1);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;

      IF pde1 <> NIL THEN
        display_pde (output_fid, pde1, fsc$disbt_pde, indent + 4, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;

      IF STRLENGTH (pde2_description) > 0 THEN
        STRINGREP (output_string, output_length, ' ': indent, pde2_description, ' : ', pde2);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;

      IF pde2 <> NIL THEN
        display_pde (output_fid, pde2, fsc$disbt_pde, indent + 4, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;

    PROCEND display_tree_error;

    PROCEDURE [INLINE] validate_active_path_part
      (    pde: ^fmt$path_description_entry;
       VAR status: ost$status);

      VAR
        error: string (80),
        error_length: integer,
        i: integer,
        participation_count: integer,
        pdu: ^fmt$path_description_unit;

      pdu := fmv$initial_pdu_pointer;
      participation_count := 0;

      REPEAT
        FOR i := 1 TO #SIZE (pdu^.entry_assignment^) DO
          IF pdu^.entry_assignment^ (i) = fmc$entry_assigned THEN
            IF pdu^.entries^ [i].parental_path_entry = pde THEN
              participation_count := participation_count + 1;
            IFEND;
          IFEND;
        FOREND;
        pdu := pdu^.next_path_description_unit;
      UNTIL pdu = NIL;

      IF participation_count <> pde^.active_path_participation_count THEN
        STRINGREP (error, error_length, 'Active_path_participation_count', ' should be ', participation_count,
              '.');
        display_tree_error (error (1, error_length), 'PATH_DESCRIPTION_ENTRY', pde, '', NIL, status);
      IFEND;

    PROCEND validate_active_path_part;

    PROCEDURE [INLINE] validate_cumulative_path_size
      (    pde: ^fmt$path_description_entry;
       VAR status: ost$status);

      VAR
        error: string (80),
        error_length: integer;

      IF pde^.parental_path_entry = NIL THEN
        IF pde^.cumulative_parental_path_size <> 0 THEN
          STRINGREP (error, error_length, 'Cumulative_parental_path_size', ' should be 0.');
          display_tree_error (error (1, error_length), 'PATH_DESCRIPTION_ENTRY', pde, '', NIL, status);
        IFEND;
      ELSE
        IF pde^.cumulative_parental_path_size <> (pde^.parental_path_entry^.cumulative_parental_path_size +
              pde^.parental_path_entry^.path_node_name.size + 1) THEN
          STRINGREP (error, error_length, 'Cumulative_parental_path_size', ' should be ',
                pde^.parental_path_entry^.cumulative_parental_path_size + 1,
                pde^.parental_path_entry^.path_node_name.size, '.');
          display_tree_error (error (1, error_length), 'PATH_DESCRIPTION_ENTRY', pde, '', NIL, status);
        IFEND;
      IFEND;

    PROCEND validate_cumulative_path_size;

    PROCEDURE [INLINE] validate_cycle_number
      (    pde: ^fmt$path_description_entry;
       VAR status: ost$status);

      IF (pde^.cycle_number < pfc$minimum_cycle_number) OR (pde^.cycle_number > pfc$maximum_cycle_number) THEN
        display_tree_error ('Cycle number of PDE is out of PF range.', 'PATH_DESCRIPTION_ENTRY', pde, '', NIL,
              status);
      IFEND;

    PROCEND validate_cycle_number;

    PROCEDURE [INLINE] validate_first_cycle_alias
      (    pde: ^fmt$path_description_entry;
       VAR status: ost$status);

      IF (pde^.first_cycle_alias_entry <> NIL) THEN
        IF (pde^.first_cycle_alias_entry^.entry_type <> fmc$named_object) THEN
          display_tree_error ('First_cycle_alias_entry of PDE is not a named object.',
                'PATH_DESCRIPTION_ENTRY', pde, 'FIRST_CYCLE_ALIAS_ENTRY', pde^.first_cycle_alias_entry,
                status);
        ELSEIF (pde^.first_cycle_alias_entry^.highest_cycle <> pde) THEN
          display_tree_error ('First_cycle_alias_entry of PDE does not point to PDE.',
                'PATH_DESCRIPTION_ENTRY', pde, 'FIRST_CYCLE_ALIAS_ENTRY', pde^.first_cycle_alias_entry,
                status);
        IFEND;
      IFEND;

    PROCEND validate_first_cycle_alias;

    PROCEDURE [INLINE] validate_highest_cycle
      (    pde: ^fmt$path_description_entry;
       VAR status: ost$status);

      IF (pde^.highest_cycle <> NIL) THEN
        IF (pde^.highest_cycle^.entry_type <> fmc$file_cycle_object) THEN
          display_tree_error ('Highest cycle of PDE is not a cycle object.', 'PATH_DESCRIPTION_ENTRY', pde,
                'HIGHEST_CYCLE', pde^.highest_cycle, status);
        ELSEIF (pde^.highest_cycle^.parental_path_entry <> pde) THEN
          temp_pde := pde^.highest_cycle^.first_cycle_alias_entry;
          WHILE (temp_pde <> NIL) AND (temp_pde <> pde) DO
            temp_pde := temp_pde^.next_cycle_alias_entry;
          WHILEND;
          IF temp_pde = NIL THEN
            display_tree_error ('Highest cycle of PDE does not point to PDE.', 'PATH_DESCRIPTION_ENTRY', pde,
                  'HIGHEST_CYCLE', pde^.highest_cycle, status);
          IFEND;
        IFEND;
      IFEND;

    PROCEND validate_highest_cycle;

    PROCEDURE [INLINE] validate_left_subtree
      (    pde: ^fmt$path_description_entry;
       VAR status: ost$status);

      IF (pde^.left_subtree <> NIL) THEN
        IF (pde^.left_subtree^.entry_type <> fmc$named_object) THEN
          display_tree_error ('Left subtree of PDE is not a named object.', 'PATH_DESCRIPTION_ENTRY', pde,
                'LEFT_SUBTREE', pde^.left_subtree, status);
        ELSEIF (pde^.left_subtree^.parental_tree_entry <> pde) THEN
          display_tree_error ('Left subtree of PDE does not point to PDE.', 'PATH_DESCRIPTION_ENTRY', pde,
                'LEFT_SUBTREE', pde^.left_subtree, status);
        IFEND;
      IFEND;

    PROCEND validate_left_subtree;

    PROCEDURE [INLINE] validate_next_cycle_alias_entry
      (    pde: ^fmt$path_description_entry;
       VAR status: ost$status);

      IF (pde^.next_cycle_alias_entry <> NIL) THEN
        IF (pde^.next_cycle_alias_entry^.entry_type <> fmc$named_object) THEN
          display_tree_error ('Next_cycle_alias_entry of PDE is not a named object.',
                'PATH_DESCRIPTION_ENTRY', pde, 'NEXT_CYCLE_ALIAS_ENTRY', pde^.next_cycle_alias_entry, status);
        ELSEIF (pde^.highest_cycle = NIL) THEN
          display_tree_error ('Alias pde does not point to a highest cycle.', 'ALIAS_PDE', pde, '', NIL,
                status);
        ELSEIF (pde^.highest_cycle^.next_lower_cycle <> NIL) OR
              (pde^.highest_cycle^.next_higher_cycle <> NIL) THEN
          display_tree_error ('Alias pde has more than one cycle objects.', 'ALIAS_PDE', pde, 'HIGHEST_CYCLE',
                pde^.highest_cycle, status);
        ELSEIF (pde^.next_cycle_alias_entry^.highest_cycle <> pde^.highest_cycle) THEN
          display_tree_error ('Next_cycle_alias_entry of PDE has a different highest_cycle.',
                'PATH_DESCRIPTION_ENTRY', pde, 'NEXT_CYCLE_ALIAS_ENTRY', pde^.next_cycle_alias_entry, status);
        IFEND;
      IFEND;

    PROCEND validate_next_cycle_alias_entry;

    PROCEDURE [INLINE] validate_next_higher_cycle
      (    pde: ^fmt$path_description_entry;
       VAR status: ost$status);

      IF (pde^.next_higher_cycle <> NIL) THEN
        IF (pde^.next_higher_cycle^.entry_type <> fmc$file_cycle_object) THEN
          display_tree_error ('Next higher cycle of PDE is not a cycle object.', 'PATH_DESCRIPTION_ENTRY',
                pde, 'NEXT_HIGHER_CYCLE', pde^.next_higher_cycle, status);
        ELSEIF (pde^.next_higher_cycle^.next_lower_cycle <> pde) THEN
          display_tree_error ('Next higher cycle of PDE does not point to PDE.', 'PATH_DESCRIPTION_ENTRY',
                pde, 'NEXT_HIGHER_CYCLE', pde^.next_higher_cycle, status);
        IFEND;
      IFEND;

    PROCEND validate_next_higher_cycle;

    PROCEDURE [INLINE] validate_next_lower_cycle
      (    pde: ^fmt$path_description_entry;
       VAR status: ost$status);

      IF (pde^.next_lower_cycle <> NIL) THEN
        IF (pde^.next_lower_cycle^.entry_type <> fmc$file_cycle_object) THEN
          display_tree_error ('Next lower cycle of PDE is not a cycle object.', 'PATH_DESCRIPTION_ENTRY', pde,
                'NEXT_LOWER_CYCLE', pde^.next_lower_cycle, status);
        ELSEIF (pde^.next_lower_cycle^.next_higher_cycle <> pde) THEN
          display_tree_error ('Next lower cycle of PDE does not point to PDE.', 'PATH_DESCRIPTION_ENTRY', pde,
                'NEXT_LOWER_CYCLE', pde^.next_lower_cycle, status);
        IFEND;
      IFEND;

    PROCEND validate_next_lower_cycle;

    PROCEDURE [INLINE] validate_number_of_objects
      (    number_of_named_objects: integer;
           number_of_cycle_objects: integer;
       VAR status: ost$status);

      IF (number_of_cycle_objects <> (fmv$cycle_objects_created - fmv$cycle_objects_deleted)) THEN
        error_found := TRUE;
        STRINGREP (output_string, output_length, ' ': indent,
              'Either fmv$cycle_objects_created or fmv$cycle_objects_deleted', ' is incorrect.');
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        STRINGREP (output_string, output_length, ' ': indent, 'fmv$cycle_objects_created : ',
              fmv$cycle_objects_created);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        STRINGREP (output_string, output_length, ' ': indent, 'fmv$cycle_objects_deleted : ',
              fmv$cycle_objects_deleted);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        STRINGREP (output_string, output_length, ' ': indent,
              'The number of cycle objects in the path table is ', number_of_cycle_objects, '.');
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;

      IF (number_of_named_objects <> (fmv$named_objects_created - fmv$named_objects_deleted)) THEN
        error_found := TRUE;
        STRINGREP (output_string, output_length, ' ': indent,
              'Either fmv$named_objects_created or fmv$named_objects_deleted', ' is incorrect.');
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        STRINGREP (output_string, output_length, ' ': indent, 'fmv$named_objects_created : ',
              fmv$named_objects_created);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        STRINGREP (output_string, output_length, ' ': indent, 'fmv$named_objects_deleted : ',
              fmv$named_objects_deleted);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        STRINGREP (output_string, output_length, ' ': indent,
              'The number of named objects in the path table is ', number_of_named_objects, '.');
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;

    PROCEND validate_number_of_objects;

    PROCEDURE [INLINE] validate_path_depth
      (    pde: ^fmt$path_description_entry;
       VAR status: ost$status);

      VAR
        error: string (80),
        error_length: integer,
        path_depth: integer,
        temp_pde: ^fmt$path_description_entry;

      path_depth := 0;
      temp_pde := pde;
      WHILE temp_pde^.parental_path_entry <> NIL DO
        temp_pde := temp_pde^.parental_path_entry;
        path_depth := path_depth + 1;
      WHILEND;

      IF pde^.entry_type = fmc$named_object THEN
        path_depth := path_depth + 1;
      IFEND;

      IF pde^.path_depth <> path_depth THEN
        STRINGREP (error, error_length, 'Path depth should be ', path_depth, '.');
        display_tree_error (error (1, error_length), 'PATH_DESCRIPTION_ENTRY', pde, '', NIL, status);
      IFEND;

    PROCEND validate_path_depth;

    PROCEDURE [INLINE] validate_parental_path_entry
      (    pde: ^fmt$path_description_entry;
       VAR status: ost$status);

      IF (pde^.parental_path_entry <> NIL) AND (pde^.parental_path_entry^.entry_type <> fmc$named_object) THEN
        display_tree_error ('Parental path entry of PDE is not a named object.', 'PATH_DESCRIPTION_ENTRY',
              pde, 'PARENTAL_PATH_ENTRY', pde^.parental_path_entry, status);
      IFEND;

    PROCEND validate_parental_path_entry;

    PROCEDURE [INLINE] validate_parental_tree_entry
      (    pde: ^fmt$path_description_entry;
       VAR status: ost$status);

      IF (pde^.parental_tree_entry <> NIL) THEN
        IF (pde^.parental_tree_entry^.entry_type <> fmc$named_object) THEN
          display_tree_error ('Parental tree entry of PDE is not a named object.', 'PATH_DESCRIPTION_ENTRY',
                pde, 'PARENTAL_TREE_ENTRY', pde^.parental_tree_entry, status);
        ELSEIF (pde^.parental_tree_entry^.left_subtree <> pde) AND
              (pde^.parental_tree_entry^.right_subtree <> pde) THEN
          display_tree_error ('Parental tree entry of PDE does not point to PDE.', 'PATH_DESCRIPTION_ENTRY',
                pde, 'PARENTAL_TREE_ENTRY', pde^.parental_tree_entry, status);
        IFEND;
      IFEND;

    PROCEND validate_parental_tree_entry;

    PROCEDURE [INLINE] validate_path_node_name
      (    pde: ^fmt$path_description_entry;
       VAR status: ost$status);

      VAR
        name_is_valid: boolean,
        randomized_name: ost$randomized_name,
        valid_name: ost$name;

      clp$validate_name (pde^.path_node_name.value, valid_name, name_is_valid);
      IF NOT name_is_valid THEN
        display_tree_error ('Path node name is not valid.', 'PATH_DESCRIPTION_ENTRY', pde, '', NIL, status);
      ELSEIF valid_name <> pde^.path_node_name.value THEN
        display_tree_error ('Path node name is not uppercase.', 'PATH_DESCRIPTION_ENTRY', pde, '', NIL,
              status);
      ELSEIF clp$trimmed_string_size (valid_name) <> pde^.path_node_name.size THEN
        display_tree_error ('Path node name size is incorrect.', 'PATH_DESCRIPTION_ENTRY', pde, '', NIL,
              status);
      ELSE
        osp$randomize_name (pde^.path_node_name.value, randomized_name);
        IF pde^.randomized_node_name <> randomized_name THEN
          display_tree_error ('Randomize node name size is incorrect.', 'PATH_DESCRIPTION_ENTRY', pde, '',
                NIL, status);
        IFEND;
      IFEND;

    PROCEND validate_path_node_name;

    PROCEDURE [INLINE] validate_right_subtree
      (    pde: ^fmt$path_description_entry;
       VAR status: ost$status);

      IF (pde^.right_subtree <> NIL) THEN
        IF (pde^.right_subtree^.entry_type <> fmc$named_object) THEN
          display_tree_error ('Right subtree of PDE is not a named object.', 'PATH_DESCRIPTION_ENTRY', pde,
                'RIGHT_SUBTREE', pde^.right_subtree, status);
        ELSEIF (pde^.right_subtree^.parental_tree_entry <> pde) THEN
          display_tree_error ('Right subtree of PDE does not point to PDE.', 'PATH_DESCRIPTION_ENTRY', pde,
                'RIGHT_SUBTREE', pde^.right_subtree, status);
        IFEND;
      IFEND;

    PROCEND validate_right_subtree;

    status.normal := TRUE;

    error_found := FALSE;
    number_of_cycle_objects := 0;
    number_of_named_objects := 0;
    pdu := fmv$initial_pdu_pointer;

    display_title (output_fid, 'VALIDATE PATH TABLE OBJECTS', status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    REPEAT
      FOR i := 1 TO #SIZE (pdu^.entry_assignment^) DO
        IF pdu^.entry_assignment^ (i) = fmc$entry_assigned THEN
          pde := ^pdu^.entries^ [i];
          validate_cumulative_path_size (pde, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
          validate_path_depth (pde, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
          IF pde^.entry_assignment^ <> fmc$entry_assigned THEN
            display_tree_error ('Entry assignment pointer is incorrect', 'PATH_DESCRIPTION_ENTRY', pde, '',
                  NIL, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
          IFEND;
          validate_parental_path_entry (pde, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
          IF pde^.entry_type = fmc$named_object THEN
            number_of_named_objects := number_of_named_objects + 1;
            validate_active_path_part (pde, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
            validate_parental_tree_entry (pde, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
            validate_left_subtree (pde, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
            validate_right_subtree (pde, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
            validate_path_node_name (pde, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
            validate_highest_cycle (pde, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
            validate_next_cycle_alias_entry (pde, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
          ELSE {cycle objects
            number_of_cycle_objects := number_of_cycle_objects + 1;
            validate_cycle_number (pde, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
            validate_next_lower_cycle (pde, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
            validate_next_higher_cycle (pde, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
            validate_first_cycle_alias (pde, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
          IFEND; {NAMED OBJECT ?
        IFEND; {entry_assigned}
      FOREND;
      pdu := pdu^.next_path_description_unit;
    UNTIL pdu = NIL;

    validate_number_of_objects (number_of_named_objects, number_of_cycle_objects, status);

    IF NOT error_found THEN
      STRINGREP (output_string, output_length, ' ', 'No errors found in Path Table.');
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

  PROCEND bap$validate_path_table_objects;

?? TITLE := ' PROCEDURE append_cycle_damage_symptoms', EJECT ??

  PROCEDURE append_cycle_damage_symptoms
    (    cycle_damage_symptoms: fst$cycle_damage_symptoms;
     VAR str: {i/o} string (300);
     VAR str_length: {i/o} integer);

    IF cycle_damage_symptoms = $fst$cycle_damage_symptoms [] THEN
      STRINGREP (str, str_length, str (1, str_length), 'NONE');
    ELSE
      STRINGREP (str, str_length, str (1, str_length), '(');
      IF fsc$media_image_inconsistent IN cycle_damage_symptoms THEN
        STRINGREP (str, str_length, str (1, str_length), 'fsc$media_image_inconsistant, ');
      IFEND;
      IF fsc$respf_modification_mismatch IN cycle_damage_symptoms THEN
        STRINGREP (str, str_length, str (1, str_length), 'fsc$respf_modification_mismatch, ');
      IFEND;
      IF fsc$cycle_restored IN cycle_damage_symptoms THEN
        STRINGREP (str, str_length, str (1, str_length), 'fsc$cycle_restored, ');
      IFEND;
      IF fsc$parent_catalog_restored IN cycle_damage_symptoms THEN
        STRINGREP (str, str_length, str (1, str_length), 'fsc$parent_catalog_restored, ');
      IFEND;
      str_length := str_length - 1;
      str (str_length) := ')';
    IFEND;

  PROCEND append_cycle_damage_symptoms;

?? TITLE := ' PROCEDURE append_file_access_options ', EJECT ??

  PROCEDURE append_file_access_options
    (    access_or_share_modes: fst$file_access_options;
     VAR str: {i/o} string (bat$display_tables_str_length);
     VAR str_length: {i/o} integer);

    VAR
      usage_selections: pft$usage_selections;

    #UNCHECKED_CONVERSION (access_or_share_modes, usage_selections);
    append_usage_selections (usage_selections, str, str_length);

  PROCEND append_file_access_options;

?? TITLE := ' PROCEDURE append_logging_options ', EJECT ??

  PROCEDURE append_logging_options
    (    logging_options: amt$logging_options;
     VAR str: {i/o} string (bat$display_tables_str_length);
     VAR str_length: {i/o} integer);

    IF logging_options = $amt$logging_options [] THEN
      STRINGREP (str, str_length, str (1, str_length), 'NONE');
    ELSE
      STRINGREP (str, str_length, str (1, str_length), '(');
      IF amc$enable_parcels IN logging_options THEN
        STRINGREP (str, str_length, str (1, str_length), 'AMC$ENABLE_PARCELS, ');
      IFEND;
      IF amc$enable_media_recovery IN logging_options THEN
        STRINGREP (str, str_length, str (1, str_length), 'AMC$ENABLE_MEDIA_RECOVERY, ');
      IFEND;
      IF amc$enable_request_recovery IN logging_options THEN
        STRINGREP (str, str_length, str (1, str_length), 'AMC$ENABLE_REQUEST_RECOVERY, ');
      IFEND;
      str_length := str_length - 1;
      str (str_length) := ')';
    IFEND;

  PROCEND append_logging_options;

?? TITLE := ' PROCEDURE append_message_control ', EJECT ??

  PROCEDURE append_message_control
    (    message_control: amt$message_control;
     VAR str: {i/o} string (bat$display_tables_str_length);
     VAR str_length: {i/o} integer);

    IF message_control = $amt$message_control [] THEN
      STRINGREP (str, str_length, str (1, str_length), 'NONE');
    ELSE
      STRINGREP (str, str_length, str (1, str_length), '(');
      IF amc$trivial_errors IN message_control THEN
        STRINGREP (str, str_length, str (1, str_length), 'AMC$TRIVIAL_ERRORS, ');
      IFEND;
      IF amc$messages IN message_control THEN
        STRINGREP (str, str_length, str (1, str_length), 'AMC$MESSAGES, ');
      IFEND;
      IF amc$statistics IN message_control THEN
        STRINGREP (str, str_length, str (1, str_length), 'AMC$STATISTICS, ');
      IFEND;
      str_length := str_length - 1;
      str (str_length) := ')';
    IFEND;

  PROCEND append_message_control;

?? TITLE := ' PROCEDURE append_usage_selections ', EJECT ??

  PROCEDURE append_usage_selections
    (    access_or_share_modes: pft$usage_selections;
     VAR str: {i/o} string (bat$display_tables_str_length);
     VAR str_length: {i/o} integer);

    VAR
      usage_option: pft$usage_options;

    IF access_or_share_modes = $pft$usage_selections [] THEN
      STRINGREP (str, str_length, str (1, str_length), 'NONE');
    ELSE
      STRINGREP (str, str_length, str (1, str_length), '(');
      FOR usage_option := LOWERVALUE (pft$usage_options) TO UPPERVALUE (pft$usage_options) DO
        IF usage_option IN access_or_share_modes THEN
          STRINGREP (str, str_length, str (1, str_length), amv$usage_option_names [usage_option].
                name (1, amv$usage_option_names [usage_option].size), ', ');
        IFEND;
      FOREND;
      str_length := str_length - 1;
      str (str_length) := ')';
    IFEND;

  PROCEND append_usage_selections;

?? TITLE := ' PROCEDURE display_apfid ', EJECT ??

  PROCEDURE display_apfid
    (    output_fid: amt$file_identifier;
         apfid: pft$attached_permanent_file_id,
         indent: bat$display_tables_indention;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      output_length: integer,
      output_string: string (bat$display_tables_str_length);


    status.normal := TRUE;
    CASE apfid.family_location OF
    = pfc$local_mainframe =
      STRINGREP (output_string, output_length, ' ': indent, 'pfc$local_mainframe - index : ',
            apfid.attached_pf_table_index);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    = pfc$server_mainframe =
      STRINGREP (output_string, output_length, ' ': indent, 'pfc$server_mainframe - index : ',
            apfid.server_attached_pf_table_index);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      STRINGREP (output_string, output_length, ' ': indent, 'Served family index : ',
            apfid.served_family_table_index.pointers_index, ' ',
            apfid.served_family_table_index.family_list_index);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      STRINGREP (output_string, output_length, ' ': indent,
            'Server lifetime : ', apfid.server_lifetime);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

    ELSE
      STRINGREP (output_string, output_length, ' ': indent, ' UNKNOWN residence ');
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

    CASEND;
  PROCEND display_apfid;

?? TITLE := 'PROCEDURE display_cd_entry', EJECT ??

  PROCEDURE display_cd_entry
    (    output_fid: amt$file_identifier;
         cde: ^fmt$cycle_description;
         expansion_limit: fst$path_table_expansion_limit;
         indent: bat$display_tables_indention;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      local_indent: bat$display_tables_indention,
      output_length: integer,
      output_string: string (bat$display_tables_str_length),
      path_handle_name: fst$path_handle_name;

    status.normal := TRUE;

    IF cde^.entry_assignment^ = fmc$entry_assigned THEN
      clp$construct_path_handle_name (cde^.path_handle, path_handle_name);
      STRINGREP (output_string, output_length, ' ': indent, 'path_handle_name : ',
            path_handle_name);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, 'global_file_information : ',
            cde^.global_file_information);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      IF (expansion_limit > fsc$disbt_cd) AND (cde^.global_file_information <> NIL) THEN
        display_global_file_info (output_fid, cde^.global_file_information, indent + 4, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, 'static_setfa_entries : ',
            cde^.static_setfa_entries);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, 'cd_attachment_options : ',
            cde^.cd_attachment_options);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      IF cde^.cd_attachment_options <> NIL THEN
        IF cde^.cd_attachment_options^.free_behind_specified THEN
          STRINGREP (output_string, output_length, ' ': indent+4, 'free_behind : ',
                cde^.cd_attachment_options^.free_behind);
          amp$put_next (output_fid, ^output_string, output_length, ba, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        IFEND;
        IF cde^.cd_attachment_options^.job_write_concurrency_specified THEN
          STRINGREP (output_string, output_length, ' ': indent+4, 'job_write_concurrency : ',
                cde^.cd_attachment_options^.job_write_concurrency);
          amp$put_next (output_fid, ^output_string, output_length, ba, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        IFEND;
        IF cde^.cd_attachment_options^.private_read_specified THEN
          STRINGREP (output_string, output_length, ' ': indent+4, 'private_read : ',
                cde^.cd_attachment_options^.private_read);
          amp$put_next (output_fid, ^output_string, output_length, ba, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        IFEND;
        IF cde^.cd_attachment_options^.sequential_access_specified THEN
          STRINGREP (output_string, output_length, ' ': indent+4, 'sequential_access : ',
                cde^.cd_attachment_options^.sequential_access);
          amp$put_next (output_fid, ^output_string, output_length, ba, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        IFEND;
        IF cde^.cd_attachment_options^.transfer_size_specified THEN
          STRINGREP (output_string, output_length, ' ': indent+4, 'transfer_size : ',
                cde^.cd_attachment_options^.transfer_size);
          amp$put_next (output_fid, ^output_string, output_length, ba, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        IFEND;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, 'dynamic_setfa_entries : ',
            cde^.dynamic_setfa_entries);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, 'attached_file : ', cde^.attached_file);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      IF cde^.attached_file THEN
        local_indent := indent + 4;
        STRINGREP (output_string, output_length, ' ': local_indent, 'system_file_label  ');
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        IF (expansion_limit > fsc$disbt_cd) THEN
          display_system_file_label (output_fid, ^cde^.system_file_label, local_indent + 4, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        IFEND;

        STRINGREP (output_string, output_length, ' ': local_indent, 'device_class : ',
              amv$device_class_names [cde^.device_class].name);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        local_indent := local_indent + 4;
        CASE cde^.device_class OF
        = rmc$magnetic_tape_device, rmc$mass_storage_device =
          STRINGREP (output_string, output_length, ' ': local_indent, 'job_routing_label : ',
                cde^.job_routing_label);
          amp$put_next (output_fid, ^output_string, output_length, ba, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;

          STRINGREP (output_string, output_length, ' ': local_indent, 'job_routing_label_length : ',
                cde^.job_routing_label_length);
          amp$put_next (output_fid, ^output_string, output_length, ba, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;

          STRINGREP (output_string, output_length, ' ': local_indent, 'system_file_sfid : ',
                cde^.system_file_id.file_entry_index, ' ', cde^.system_file_id.residence,
                ' ', cde^.system_file_id.file_hash);
          amp$put_next (output_fid, ^output_string, output_length, ba, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;

          STRINGREP (output_string, output_length, ' ': local_indent, 'permanent_file : ',
                cde^.permanent_file);
          amp$put_next (output_fid, ^output_string, output_length, ba, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;

          IF cde^.permanent_file THEN
            local_indent := local_indent + 4;
            display_apfid (output_fid, cde^.apfid, local_indent, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;

            STRINGREP (output_string, output_length, ' ': local_indent, 'attached_access_modes : ');
            append_file_access_options (cde^.attached_access_modes, output_string, output_length);
            amp$put_next (output_fid, ^output_string, output_length, ba, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;

            STRINGREP (output_string, output_length, ' ': local_indent, 'attached_share_modes : ');
            append_file_access_options (cde^.attached_share_modes, output_string, output_length);
            amp$put_next (output_fid, ^output_string, output_length, ba, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;

            STRINGREP (output_string, output_length, ' ': local_indent, 'password_protected : ',
                  cde^.password_protected);
            amp$put_next (output_fid, ^output_string, output_length, ba, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;

            STRINGREP (output_string, output_length, ' ': local_indent, 'system_file_label_catalogued : ',
                  cde^.system_file_label_catalogued);
            amp$put_next (output_fid, ^output_string, output_length, ba, status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
          IFEND;
        ELSE
        CASEND;
      IFEND;
    ELSE
      STRINGREP (output_string, output_length, ' ': indent, 'cycle_description_entry not assigned');
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

  PROCEND display_cd_entry;

?? TITLE := 'PROCEDURE display_descriptive_attr', EJECT ??

  PROCEDURE display_descriptive_attr
    (    output_fid: amt$file_identifier;
         descriptive: ^bat$descriptive_file_attributes;
         indent: bat$display_tables_indention;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      global_file_name: ost$name,
      output_length: integer,
      output_string: string (bat$display_tables_str_length);

    status.normal := TRUE;

    IF descriptive^.application_info_source <> amc$undefined_attribute THEN
      STRINGREP (output_string, output_length, ' ': indent, 'application_info : ',
            descriptive^.application_info);
    ELSE
      STRINGREP (output_string, output_length, ' ': indent, 'application_info :  Undefined');
    IFEND;
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, descriptive^.application_info_source, indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'global_access_mode : ');
    append_usage_selections (descriptive^.global_access_mode, output_string, output_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    put_source (output_fid, descriptive^.global_access_mode_source, indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    pmp$convert_binary_unique_name (descriptive^.global_file_name, global_file_name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    STRINGREP (output_string, output_length, ' ': indent, 'global_file_name : ', global_file_name);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, descriptive^.global_file_name_source, indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    pmp$convert_binary_unique_name (descriptive^.internal_cycle_name, global_file_name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    STRINGREP (output_string, output_length, ' ': indent, 'global_file_name : ', global_file_name);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, descriptive^.internal_cycle_name_source, indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'global_share_mode : ');
    append_usage_selections (descriptive^.global_share_mode, output_string, output_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, descriptive^.global_share_mode_source, indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'permanent_file : ', descriptive^.permanent_file);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, descriptive^.permanent_file_source, indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND display_descriptive_attr;

?? TITLE := 'PROCEDURE display_file_cycle_object', EJECT ??

  PROCEDURE display_file_cycle_object
    (    output_fid: amt$file_identifier;
         pde: ^fmt$path_description_entry;
         expansion_limit: fst$path_table_expansion_limit;
         indent: bat$display_tables_indention;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      output_length: integer,
      output_string: string (bat$display_tables_str_length);

    status.normal := TRUE;

    STRINGREP (output_string, output_length, ' ': indent, 'cycle_number : ', pde^.cycle_number);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'next_lower_cycle : ', pde^.next_lower_cycle);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'next_higher_cycle : ', pde^.next_higher_cycle);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'first_cycle_alias_entry : ',
          pde^.first_cycle_alias_entry);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'cycle_description : ', pde^.cycle_description);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF (expansion_limit > fsc$disbt_pde) AND (pde^.cycle_description <> NIL) THEN
      display_cd_entry (output_fid, pde^.cycle_description, expansion_limit, indent + 4, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

  PROCEND display_file_cycle_object;

?? TITLE := 'PROCEDURE display_pri', EJECT ??

  PROCEDURE display_pri
    (    output_fid: amt$file_identifier;
         pri: ^bat$private_read_information;
         indent: bat$display_tables_indention;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      output_length: integer,
      output_string: string (bat$display_tables_str_length),
      local_indent: bat$display_tables_indention;

    status.normal := TRUE;

    STRINGREP (output_string, output_length, ' ': indent, 'error_status : ', pri^.error_status);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'last_access_operation : ',
          pri^.last_access_operation);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'positioning_info ');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    local_indent := indent + 4;
    STRINGREP (output_string, output_length, ' ': local_indent, 'block_info ');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    local_indent := local_indent + 4;
    STRINGREP (output_string, output_length, ' ': local_indent, 'block_number : ',
          pri^.positioning_info.block_info.block_number);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'block_position : ',
          pri^.positioning_info.block_info.block_position);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'current_block_byte_address : ',
          pri^.positioning_info.block_info.current_block_byte_address);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'current_block_length : ',
          pri^.positioning_info.block_info.current_block_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'previous_block_header_fba : ',
          pri^.positioning_info.block_info.previous_block_header_fba);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'residual_block_length : ',
          pri^.positioning_info.block_info.residual_block_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    local_indent := indent + 4;
    STRINGREP (output_string, output_length, ' ': local_indent, 'record_info ');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    local_indent := local_indent + 4;
    STRINGREP (output_string, output_length, ' ': local_indent, 'bor_address : ',
          pri^.positioning_info.record_info.bor_address);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'current_byte_address : ',
          pri^.positioning_info.record_info.current_byte_address);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'file_position : ',
          bav$file_positions [pri^.positioning_info.record_info.file_position]);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'record_header_fba : ',
          pri^.positioning_info.record_info.record_header_fba);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'record_length : ',
          pri^.positioning_info.record_info.record_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'residual_record_length : ',
          pri^.positioning_info.record_info.residual_record_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'transfer_count : ',
          pri^.positioning_info.record_info.transfer_count);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND display_pri;

?? TITLE := 'PROCEDURE display_global_file_info', EJECT ??

  PROCEDURE display_global_file_info
    (    output_fid: amt$file_identifier;
         gfi: ^bat$global_file_information;
         indent: bat$display_tables_indention;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      cycle_damage_string: string (300),
      local_indent: bat$display_tables_indention,
      output_length: integer,
      output_string: string (bat$display_tables_str_length);

    status.normal := TRUE;

    STRINGREP (output_string, output_length, ' ': indent, 'open_count : ', gfi^.open_count);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'open_lock : ', gfi^.open_lock.lock_id);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'implicit_detach_inhibited : ',
          gfi^.implicit_detach_inhibited);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (cycle_damage_string, output_length, ' ': indent, 'cycle_damage_symptoms : ');
    append_cycle_damage_symptoms (gfi^.cycle_damage_symptoms, cycle_damage_string, output_length);
    amp$put_next (output_fid, ^cycle_damage_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'device_dependent_info');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent + 4, 'device_class : ',
          amv$device_class_names [gfi^.device_dependent_info.device_class].name);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'eoi_byte_address : ', gfi^.eoi_byte_address);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'eoi_set : ', gfi^.eoi_set);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'error_status : ', gfi^.error_status);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'file_limit : ', gfi^.file_limit);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'last_access_operation : ',
          gfi^.last_access_operation);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'max_block_size : ', gfi^.max_block_size);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'max_data_size : ', gfi^.max_data_size);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'max_record_length : ', gfi^.max_record_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'min_block_length : ', gfi^.min_block_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'opened_access_modes : read=',
          gfi^.opened_access_modes [fsc$read], ' shorten=', gfi^.opened_access_modes [fsc$shorten],
          ' append=', gfi^.opened_access_modes [fsc$append],
          ' modify=', gfi^.opened_access_modes [fsc$modify],
          ' execute=', gfi^.opened_access_modes [fsc$execute]);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'padding_character : ',
          $INTEGER (gfi^.padding_character): #(16), '(16)');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'positioning_info ');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    local_indent := indent + 4;
    STRINGREP (output_string, output_length, ' ': local_indent, 'block_info ');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    local_indent := local_indent + 4;
    STRINGREP (output_string, output_length, ' ': local_indent, 'block_number : ',
          gfi^.positioning_info.block_info.block_number);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'block_position : ',
          gfi^.positioning_info.block_info.block_position);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'current_block_byte_address : ',
          gfi^.positioning_info.block_info.current_block_byte_address);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'current_block_length : ',
          gfi^.positioning_info.block_info.current_block_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'previous_block_header_fba : ',
          gfi^.positioning_info.block_info.previous_block_header_fba);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'residual_block_length : ',
          gfi^.positioning_info.block_info.residual_block_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    local_indent := indent + 4;
    STRINGREP (output_string, output_length, ' ': local_indent, 'record_info ');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    local_indent := local_indent + 4;
    STRINGREP (output_string, output_length, ' ': local_indent, 'bor_address : ',
          gfi^.positioning_info.record_info.bor_address);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'current_byte_address : ',
          gfi^.positioning_info.record_info.current_byte_address);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'file_position : ',
          bav$file_positions [gfi^.positioning_info.record_info.file_position]);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'record_header_fba : ',
          gfi^.positioning_info.record_info.record_header_fba);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'record_length : ',
          gfi^.positioning_info.record_info.record_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'residual_record_length : ',
          gfi^.positioning_info.record_info.residual_record_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'transfer_count : ',
          gfi^.positioning_info.record_info.transfer_count);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'prevented_open_access_modes : read=',
          gfi^.prevented_open_access_modes [fsc$read], ' shorten=', gfi^.
          prevented_open_access_modes [fsc$shorten], ' append=', gfi^.
          prevented_open_access_modes [fsc$append], ' modify=', gfi^.prevented_open_access_modes [fsc$modify],
          ' execute=', gfi^.prevented_open_access_modes [fsc$execute]);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'record_delimiting_character : ',
          $INTEGER (gfi^.record_delimiting_character): #(16), '(16)');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND display_global_file_info;
?? TITLE := 'PROCEDURE display_instance_attributes', EJECT ??

  PROCEDURE display_instance_attributes
    (    output_fid: amt$file_identifier;
         instance_attributes: ^bat$instance_attributes;
         indent: bat$display_tables_indention;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      local_indent: bat$display_tables_indention,
      output_length: integer,
      output_string: string (bat$display_tables_str_length);

    status.normal := TRUE;

    STRINGREP (output_string, output_length, ' ': indent, 'instance_attributes.static_label');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    local_indent := indent + 4;
    STRINGREP (output_string, output_length, ' ': local_indent, 'block_type : ',
          amv$block_type_names [instance_attributes^.static_label.block_type].name);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.static_label.block_type_source, local_indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'file_organization : ',
          amv$file_organization_names [instance_attributes^.static_label.file_organization].name);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.static_label.file_organization_source, local_indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'record_type : ',
          amv$record_type_names [instance_attributes^.static_label.record_type].name);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.static_label.record_type_source, local_indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'ring_attributes.r1 : ',
          instance_attributes^.static_label.ring_attributes.r1);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    STRINGREP (output_string, output_length, ' ': local_indent, 'ring_attributes.r2 : ',
          instance_attributes^.static_label.ring_attributes.r2);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    STRINGREP (output_string, output_length, ' ': local_indent, 'ring_attributes.r3 : ',
          instance_attributes^.static_label.ring_attributes.r3);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.static_label.ring_attributes_source, local_indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'instance_attributes.dynamic_label');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'access_mode : ');
    append_usage_selections (instance_attributes^.dynamic_label.access_mode, output_string, output_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.dynamic_label.access_mode_source, local_indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'error_exit_name : ',
          instance_attributes^.dynamic_label.error_exit_name);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.dynamic_label.error_exit_name_source, local_indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF instance_attributes^.dynamic_label.error_exit_procedure = NIL THEN
      STRINGREP (output_string, output_length, ' ': local_indent, 'error_exit_procedure : NIL_POINTER');
    ELSE
      STRINGREP (output_string, output_length, ' ': local_indent, 'error_exit_procedure : ',
            instance_attributes^.dynamic_label.error_exit_procedure);
    IFEND;
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.dynamic_label.error_exit_procedure_source, local_indent,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'perform_failure_recovery : ',
          instance_attributes^.dynamic_label.error_options.perform_failure_recovery, '    error_action : ',
          instance_attributes^.dynamic_label.error_options.error_action);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.dynamic_label.error_options_source, local_indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'label_exit_name : ',
          instance_attributes^.dynamic_label.label_exit_name);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.dynamic_label.label_exit_name_source, local_indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF instance_attributes^.dynamic_label.label_exit_procedure = NIL THEN
      STRINGREP (output_string, output_length, ' ': local_indent, 'label_exit_procedure : NIL_POINTER');
    ELSE
      STRINGREP (output_string, output_length, ' ': local_indent, 'label_exit_procedure : ',
            instance_attributes^.dynamic_label.label_exit_procedure);
    IFEND;
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.dynamic_label.label_exit_procedure_source, local_indent,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    CASE instance_attributes^.dynamic_label.open_position OF
    = amc$open_at_boi =
      STRINGREP (output_string, output_length, ' ': local_indent, 'open_position : amc$open_at_boi');
    = amc$open_no_positioning =
      STRINGREP (output_string, output_length, ' ': local_indent, 'open_position : amc$open_no_positioning');
    = amc$open_at_eoi =
      STRINGREP (output_string, output_length, ' ': local_indent, 'open_position : amc$open_at_eoi');
    ELSE
      STRINGREP (output_string, output_length, ' ': local_indent, 'open_position : INVALID OPEN_POSITION');
    CASEND;
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.dynamic_label.open_position_source, local_indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'open_share_modes : ');
    append_file_access_options (instance_attributes^.dynamic_label.open_share_modes, output_string,
          output_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.dynamic_label.open_share_modes_source, local_indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'return_option : ',
          instance_attributes^.dynamic_label.return_option);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.dynamic_label.return_option_source, local_indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'error_limit : ',
          instance_attributes^.dynamic_label.error_limit);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.dynamic_label.error_limit_source, local_indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': local_indent, 'message_control : ');
    append_message_control (instance_attributes^.dynamic_label.message_control, output_string, output_length);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_source (output_fid, instance_attributes^.dynamic_label.message_control_source, local_indent, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND display_instance_attributes;

?? TITLE := 'PROCEDURE display_named_object', EJECT ??

  PROCEDURE display_named_object
    (    output_fid: amt$file_identifier;
         pde: ^fmt$path_description_entry;
         indent: bat$display_tables_indention;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      output_length: integer,
      output_string: string (bat$display_tables_str_length);

    status.normal := TRUE;

    STRINGREP (output_string, output_length, ' ': indent, 'active_path_participation_count : ',
          pde^.active_path_participation_count);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'parental_tree_entry : ', pde^.parental_tree_entry);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'left_subtree : ', pde^.left_subtree);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'right_subtree : ', pde^.right_subtree);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'path_node_name : ', pde^.path_node_name.value);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'randomized_node_name : ',
          pde^.randomized_node_name);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'highest_cycle : ', pde^.highest_cycle);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'next_cycle_alias_entry : ',
          pde^.next_cycle_alias_entry);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND display_named_object;

?? TITLE := 'PROCEDURE display_pde', EJECT ??

  PROCEDURE display_pde
    (    output_fid: amt$file_identifier;
         pde: ^fmt$path_description_entry;
         expansion_limit: fst$path_table_expansion_limit;
         indent: bat$display_tables_indention;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      output_length: integer,
      output_string: string (bat$display_tables_str_length);

    status.normal := TRUE;

    IF (pde^.unique_identifier = fmc$pde_unique_identifier) AND
          (pde^.entry_assignment^ = fmc$entry_assigned) THEN

      STRINGREP (output_string, output_length, ' ': indent, 'unique_identifier : ', pde^.unique_identifier:
            #(16), '(16)');
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, 'cumulative_parental_path_size : ',
            pde^.cumulative_parental_path_size);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, 'path_depth : ', pde^.path_depth);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, 'entry_assignment_counter : ',
            pde^.entry_assignment_counter: #(16), '(16)');
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, 'parental_path_entry : ',
            pde^.parental_path_entry);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent, 'path_handle_name_externalized : ',
            pde^.path_handle_name_externalized);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      CASE pde^.entry_type OF
      = fmc$named_object =
        STRINGREP (output_string, output_length, ' ': indent, 'entry_type : fmc$named_object');
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        display_named_object (output_fid, pde, indent + 4, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

      = fmc$file_cycle_object =
        STRINGREP (output_string, output_length, ' ': indent, 'entry_type : fmc$file_cycle_object');
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        display_file_cycle_object (output_fid, pde, expansion_limit, indent + 4, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

      ELSE
      CASEND

    ELSE
      IF pde^.unique_identifier <> fmc$pde_unique_identifier THEN
        STRINGREP (output_string, output_length, ' ': indent, 'Invalid pde passed to display_pde');
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      ELSE
        STRINGREP (output_string, output_length, ' ': indent, 'Entry not assigned');
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;
    IFEND;

  PROCEND display_pde;

?? TITLE := 'PROCEDURE display_static_label_attributes', EJECT ??

  PROCEDURE display_static_label_attributes
    (    output_fid: amt$file_identifier;
         expanded_static_label: bat$static_label_attributes;
         indent: bat$display_tables_indention;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      default_file_attributes: bat$static_label_attributes,
      default_new_retention: fst$retention,
      default_new_retention_specified: boolean,
      output_length: integer,
      output_library: string (amc$max_path_name_size + 100),
      output_string: string (bat$display_tables_str_length);

    status.normal := TRUE;

    bap$get_default_file_attribs (default_file_attributes, default_new_retention_specified,
          default_new_retention, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF expanded_static_label.block_type_source <> default_file_attributes.block_type_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'block_type : ',
            amv$block_type_names [expanded_static_label.block_type].name);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.block_type_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.character_conversion_source <>
          default_file_attributes.character_conversion_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'character_conversion : ',
            expanded_static_label.character_conversion);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.character_conversion_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.clear_space_source <> default_file_attributes.clear_space_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'clear_space : ',
            expanded_static_label.clear_space);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.clear_space_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.file_access_procedure_source <>
          default_file_attributes.file_access_procedure_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'file_access_procedure : ',
            expanded_static_label.file_access_procedure);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.file_access_procedure_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.file_contents_source <> default_file_attributes.file_contents_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'file_contents : ',
            expanded_static_label.file_contents);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.file_contents_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.file_limit_source <> default_file_attributes.file_limit_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'file_limit : ',
            expanded_static_label.file_limit);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.file_limit_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.file_organization_source <> default_file_attributes.file_organization_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'file_organization : ',
            amv$file_organization_names [expanded_static_label.file_organization].name);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.file_organization_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.file_processor_source <> default_file_attributes.file_processor_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'file_processor : ',
            expanded_static_label.file_processor);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.file_processor_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.file_structure_source <> default_file_attributes.file_structure_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'file_structure : ',
            expanded_static_label.file_structure);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.file_structure_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.forced_write <> default_file_attributes.forced_write THEN
      STRINGREP (output_string, output_length, ' ': indent, 'forced_write : ',
            expanded_static_label.forced_write);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.forced_write_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.internal_code_source <> default_file_attributes.internal_code_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'internal_code : ',
            expanded_static_label.internal_code);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.internal_code_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.label_type <> default_file_attributes.label_type THEN
      STRINGREP (output_string, output_length, ' ': indent, 'label_type : ',
            expanded_static_label.label_type);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.label_type_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.line_number <> default_file_attributes.line_number THEN
      STRINGREP (output_string, output_length, ' ': indent, 'line_number.length : ',
            expanded_static_label.line_number.length, '  line_number.location : ',
            expanded_static_label.line_number.location);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.line_number_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.max_block_length_source <> default_file_attributes.max_block_length_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'max_block_length : ',
            expanded_static_label.max_block_length);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.max_block_length_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.max_record_length_source <> default_file_attributes.max_record_length_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'max_record_length : ',
            expanded_static_label.max_record_length);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.max_record_length_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.min_block_length_source <> default_file_attributes.min_block_length_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'min_block_length : ',
            expanded_static_label.min_block_length);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.min_block_length_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.min_record_length_source <> default_file_attributes.min_record_length_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'min_record_length : ',
            expanded_static_label.min_record_length);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.min_record_length_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.padding_character_source <> default_file_attributes.padding_character_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'padding_character : ',
            $INTEGER (expanded_static_label.padding_character): #(16), '(16)');
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.padding_character_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.page_format_source <> default_file_attributes.page_format_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'page_format : ',
            expanded_static_label.page_format);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.page_format_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.page_length_source <> default_file_attributes.page_length_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'page_length : ',
            expanded_static_label.page_length);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.page_length_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.page_width_source <> default_file_attributes.page_width_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'page_width : ',
            expanded_static_label.page_width);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.page_width_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.preset_value <> default_file_attributes.preset_value THEN
      STRINGREP (output_string, output_length, ' ': indent, 'preset_value : ',
            expanded_static_label.preset_value);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.preset_value_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.record_delimiting_char_source <>
          default_file_attributes.record_delimiting_char_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'record_delimiting_character : ',
            $INTEGER (expanded_static_label.record_delimiting_character): #(16), '(16)');
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.record_delimiting_char_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.record_type_source <> default_file_attributes.record_type_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'record_type : ',
            amv$record_type_names [expanded_static_label.record_type].name);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.record_type_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;


    IF expanded_static_label.statement_identifier_source <>
          default_file_attributes.statement_identifier_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'statement_identifier :  length = ',
            expanded_static_label.statement_identifier.length, ' location = ',
            expanded_static_label.statement_identifier.location);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.statement_identifier_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.user_info_source <> default_file_attributes.user_info_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'user_info : ', expanded_static_label.user_info);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.user_info_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.vertical_print_density_source <>
          default_file_attributes.vertical_print_density_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'vertical_print_density : ',
            expanded_static_label.vertical_print_density);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.vertical_print_density_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.average_record_length_source <>
          default_file_attributes.average_record_length_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'average_record_length : ',
            expanded_static_label.average_record_length);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.average_record_length_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.collate_table_source <> default_file_attributes.collate_table_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'collate_table : set but not displayed');
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.collate_table_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.collate_table_name_source <>
          default_file_attributes.collate_table_name_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'collate_table_name : ',
            expanded_static_label.collate_table_name);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.collate_table_name_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.compression_proc_name_source <>
          default_file_attributes.compression_proc_name_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'compression_procedure_name.name : ',
            expanded_static_label.compression_procedure_name.name);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      STRINGREP (output_library, output_length, ' ': indent, 'compression_procedure_name.object_library : ',
            expanded_static_label.compression_procedure_name.object_library
            (1, clp$trimmed_string_size (expanded_static_label.compression_procedure_name.object_library)));
      amp$put_next (output_fid, ^output_library, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.compression_proc_name_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.data_padding_source <> default_file_attributes.data_padding_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'data_padding : ',
            expanded_static_label.data_padding);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.data_padding_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.dynamic_home_block_space_source <>
          default_file_attributes.dynamic_home_block_space_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'dynamic_home_block_space : ',
            expanded_static_label.dynamic_home_block_space);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.dynamic_home_block_space_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.embedded_key_source <> default_file_attributes.embedded_key_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'embedded_key : ',
            expanded_static_label.embedded_key);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.embedded_key_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.estimated_record_count_source <>
          default_file_attributes.estimated_record_count_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'estimated_record_count : ',
            expanded_static_label.estimated_record_count);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.estimated_record_count_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.hashing_procedure_name_source <>
          default_file_attributes.hashing_procedure_name_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'hashing_procedure_name.name : ',
            expanded_static_label.hashing_procedure_name.name);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      STRINGREP (output_library, output_length, ' ': indent, 'hashing_procedure_name.object_library : ',
            expanded_static_label.hashing_procedure_name.object_library
            (1, clp$trimmed_string_size (expanded_static_label.hashing_procedure_name.object_library)));
      amp$put_next (output_fid, ^output_library, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.hashing_procedure_name_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.index_levels_source <> default_file_attributes.index_levels_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'index_levels : ',
            expanded_static_label.index_levels);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.index_levels_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.index_padding_source <> default_file_attributes.index_padding_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'index_padding : ',
            expanded_static_label.index_padding);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.index_padding_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.initial_home_block_count_source <>
          default_file_attributes.initial_home_block_count_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'initial_home_block_count : ',
            expanded_static_label.initial_home_block_count);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.initial_home_block_count_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.key_length_source <> default_file_attributes.key_length_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'key_length : ',
            expanded_static_label.key_length);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.key_length_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.key_position_source <> default_file_attributes.key_position_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'key_position : ',
            expanded_static_label.key_position);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.key_position_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.key_type_source <> default_file_attributes.key_type_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'key_type : ', expanded_static_label.key_type);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.key_type_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.loading_factor_source <> default_file_attributes.loading_factor_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'loading_factor : ',
            expanded_static_label.loading_factor);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.loading_factor_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.lock_expiration_time_source <>
          default_file_attributes.lock_expiration_time_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'lock_expiration_time : ',
            expanded_static_label.lock_expiration_time);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.lock_expiration_time_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.logging_options_source <> default_file_attributes.logging_options_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'logging_options : ');
      append_logging_options (expanded_static_label.logging_options, output_string, output_length);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.logging_options_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.log_residence_source <> default_file_attributes.log_residence_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'log_residence : ',
            expanded_static_label.log_residence);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.log_residence_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.record_limit_source <> default_file_attributes.record_limit_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'record_limit : ',
            expanded_static_label.record_limit);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.record_limit_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF expanded_static_label.records_per_block_source <> default_file_attributes.records_per_block_source THEN
      STRINGREP (output_string, output_length, ' ': indent, 'records_per_block : ',
            expanded_static_label.records_per_block);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      put_source (output_fid, expanded_static_label.records_per_block_source, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

  PROCEND display_static_label_attributes;

?? TITLE := 'PROCEDURE display_system_file_label', EJECT ??

  PROCEDURE display_system_file_label
    (    output_fid: amt$file_identifier;
         sfl: ^fmt$system_file_label;
         indent: bat$display_tables_indention;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      expanded_static_label: bat$static_label_attributes,
      file_previously_opened: boolean,
      header: ^fmt$static_label_header,
      local_indent: bat$display_tables_indention,
      output_length: integer,
      output_string: string (bat$display_tables_str_length),
      static_label: ^SEQ ( * );

    status.normal := TRUE;

    STRINGREP (output_string, output_length, ' ': indent, 'file_previously_opened : ',
          sfl^.file_previously_opened);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'static_label : ', sfl^.static_label);
    { pointer to seq }
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    fsp$expand_file_label (sfl^.static_label, expanded_static_label, file_previously_opened, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF sfl^.static_label <> NIL THEN
      static_label := sfl^.static_label;
      local_indent := indent + 4;

      RESET static_label;
      NEXT header IN static_label;
      STRINGREP (output_string, output_length, ' ': local_indent, 'unique_character : ',
            header^.unique_character);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': local_indent, 'revision_level : ',
            header^.revision_level);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': local_indent, 'highest_attribute_present : ',
            header^.highest_attribute_present);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': local_indent, 'highest_attribute_supported : ',
            header^.highest_attribute_supported);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': local_indent, 'job_routing_label_size : ',
            header^.job_routing_label_size);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': local_indent, 'default_revision_level : ',
            header^.default_revision_level);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': local_indent, 'user_attribute_length : ',
            header^.user_attribute_length);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': local_indent, 'file_previously_opened : ',
            header^.file_previously_opened);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      IF header^.file_previously_opened THEN
        STRINGREP (output_string, output_length, ' ': local_indent + 4, 'ring_attributes : ',
              header^.ring_attributes.r1, ' ', header^.ring_attributes.r2, ' ', header^.ring_attributes.r3);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;

      IF header^.highest_attribute_present > 0 THEN
        STRINGREP (output_string, output_length, ' ': local_indent,
              'static_label_attributes - nondefault values');
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        display_static_label_attributes (output_fid, expanded_static_label, local_indent + 4, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      ELSE
        STRINGREP (output_string, output_length, ' ': local_indent, 'NO static_label_attributes present');
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'descriptive_file_attributes ');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    display_descriptive_attr (output_fid, ^sfl^.descriptive_label, indent + 4, status);

  PROCEND display_system_file_label;

?? TITLE := 'PROCEDURE display_title', EJECT ??

  PROCEDURE display_title
    (    output_fid: amt$file_identifier;
         title: string ( * <= title_length);
     VAR status: ost$status);

    CONST
      asterisks_constant = '****************************************' CAT
            '****************************************';

    VAR
      asterisks: string (80),
      ba: amt$file_byte_address,
      output_length: integer,
      output_string: string (bat$display_tables_str_length);

    status.normal := TRUE;

    asterisks := asterisks_constant;
    STRINGREP (output_string, output_length, '1', asterisks (1, title_length));
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    STRINGREP (output_string, output_length, ' ', asterisks
          (1, ((title_length DIV 2) - (STRLENGTH (title) DIV 2) - 2 {spaces} )), '  ', title, '  ',
          asterisks (1, (((title_length + 1) DIV 2) - ((STRLENGTH (title) + 1) DIV 2) - 2 {spaces} )));
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    STRINGREP (output_string, output_length, ' ', asterisks (1, title_length));
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    output_string := '0 ';
    amp$put_next (output_fid, ^output_string, 2, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND display_title;

?? TITLE := 'PROCEDURE display_tft_entry', EJECT ??

  PROCEDURE display_tft_entry
    (    output_fid: amt$file_identifier;
         tft_entry: ^bat$task_file_entry;
         expand_task_file_table_entry: boolean;
         indent: bat$display_tables_indention;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      fap_layer: amt$fap_layer_number,
      output_length: integer,
      output_string: string (bat$display_tables_str_length);

    status.normal := TRUE;

    STRINGREP (output_string, output_length, ' ': indent, 'local_file_name : ', tft_entry^.local_file_name);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'sequence_number : ', tft_entry^.sequence_number);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);

    STRINGREP (output_string, output_length, ' ': indent, 'access_level : ',
          amv$access_level_names [tft_entry^.access_level].name);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF NOT expand_task_file_table_entry THEN
      STRINGREP (output_string, output_length, ' ': indent, 'device_class : ',
            amv$device_class_names [tft_entry^.device_class].name);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'open_ring : ', tft_entry^.open_ring);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'close_allowed : ', tft_entry^.close_allowed);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'next_target.defined : ',
          tft_entry^.next_target.defined);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF tft_entry^.next_target.defined THEN

      STRINGREP (output_string, output_length, ' ': indent + 4, 'next_target.ordinal : ',
            tft_entry^.next_target.file_identifier.ordinal);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent + 4, 'next_target.sequence : ',
            tft_entry^.next_target.file_identifier.sequence);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'instance_of_open_modified : ',
          tft_entry^.instance_of_open_modified);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'instance_attributes');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    display_instance_attributes (output_fid, ^tft_entry^.instance_attributes, indent + 4, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'previous_get_at_eoi : ',
          tft_entry^.previous_get_at_eoi);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'residual_skip_count : ',
          tft_entry^.residual_skip_count);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'private_read_information : ',
          tft_entry^.private_read_information);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF tft_entry^.private_read_information <> NIL THEN
      display_pri (output_fid, tft_entry^.private_read_information, indent + 4, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'global_file_information : ',
          tft_entry^.global_file_information);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF tft_entry^.global_file_information <> NIL THEN
      display_global_file_info (output_fid, tft_entry^.global_file_information, indent + 4, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'system_file_label :  ',
          tft_entry^.system_file_label);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF tft_entry^.system_file_label <> NIL THEN
      display_system_file_label (output_fid, tft_entry^.system_file_label, indent + 4, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent, 'fap_control_information ');
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF tft_entry^.fap_control_information.fap_array = NIL THEN
      output_fap_layer ({layer number} 0, tft_entry^.fap_control_information.
            first_fap, output_fid, indent, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    ELSE
      FOR fap_layer := 0 TO UPPERBOUND (tft_entry^.fap_control_information.
            fap_array^) DO
        output_fap_layer (fap_layer, tft_entry^.fap_control_information.
              fap_array^[fap_layer], output_fid, indent, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      FOREND;
    IFEND;
    STRINGREP (output_string, output_length, ' ': indent,
          'module_dynamically_loaded : ', tft_entry^.module_dynamically_loaded);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;


    STRINGREP (output_string, output_length, ' ': indent, 'device_class : ',
          amv$device_class_names [tft_entry^.device_class].name);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    CASE tft_entry^.device_class OF
    = rmc$mass_storage_device =

      STRINGREP (output_string, output_length, ' ': indent + 4, 'file_pva : ', tft_entry^.file_pva);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      IF tft_entry^.rollback_procedure = NIL THEN
        STRINGREP (output_string, output_length, ' ': indent + 4, 'rollback_procedure : NIL_POINTER');
      ELSE
        STRINGREP (output_string, output_length, ' ': indent + 4, 'rollback_procedure : ',
              tft_entry^.rollback_procedure);
      IFEND;
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    = rmc$connected_file_device =
      STRINGREP (output_string, output_length, ' ': indent + 4, 'subject : ',
            tft_entry^.subject);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      STRINGREP (output_string, output_length, ' ': indent + 4,
            'connection_level : ', tft_entry^.connection_level);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      IF tft_entry^.first_target.defined THEN
        STRINGREP (output_string, output_length, ' ': indent + 4,
              'first_target.file_identifier.ordinal : ',
              tft_entry^.first_target.file_identifier.ordinal);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;

        STRINGREP (output_string, output_length, ' ': indent + 4,
              'first_target.file_identifier.sequence : ',
              tft_entry^.first_target.file_identifier.sequence);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      ELSE
        STRINGREP (output_string, output_length, ' ': indent + 4,
              'first_target not defined');
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;
    = rmc$log_device =
      STRINGREP (output_string, output_length, ' ': indent + 4,
            'log_ordinal : ', tft_entry^.log_ordinal);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent + 4,
            'log_address : ', tft_entry^.log_address);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent + 4,
            'log_cycle : ', tft_entry^.log_cycle);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent + 4,
            'log_entry : ', tft_entry^.log_entry);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    = rmc$network_device =
      STRINGREP (output_string, output_length, ' ': indent + 4, 'sender_active : ', tft_entry^.sender_active);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      IF tft_entry^.sender_active THEN
        STRINGREP (output_string, output_length, ' ': indent + 4, 'sender_activity_status : ',
              tft_entry^.sender_activity_status);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent + 4, 'receiver_active : ',
            tft_entry^.receiver_active);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      IF tft_entry^.receiver_active THEN
        STRINGREP (output_string, output_length, ' ': indent + 4, 'receiver_activity_status : ',
              tft_entry^.receiver_activity_status);
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent + 4, 'data_transfer_timeout : ',
            tft_entry^.data_transfer_timeout);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent + 4, 'eoi_message_enabled : ',
            tft_entry^.eoi_message_enabled);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      IF tft_entry^.eoi_message_enabled THEN
        STRINGREP (output_string, output_length, ' ': indent + 4, 'eoi_message : ',
              tft_entry^.eoi_message^.value (1, tft_entry^.eoi_message^.size));
        amp$put_next (output_fid, ^output_string, output_length, ba, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;

      STRINGREP (output_string, output_length, ' ': indent + 4, 'eoi_peer_termination : ',
            tft_entry^.eoi_peer_termination);
      amp$put_next (output_fid, ^output_string, output_length, ba, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    ELSE
    CASEND;

  PROCEND display_tft_entry;

?? TITLE := 'PROCEDURE get_path', EJECT ??

  PROCEDURE get_path
    (    path_description_entry: ^fmt$path_description_entry;
     VAR path: fst$path;
     VAR path_length: fst$path_size;
     VAR status: ost$status);

    { PURPOSE: Given a path_description_entry, recreate a path to that node.
    {          A string containing the path is returned.

    VAR
      cycle_string: ost$string,
      pde: ^fmt$path_description_entry;

    status.normal := TRUE;
    pde := path_description_entry;
    path := osc$null_name;

    { Note: path depth is the same in last element and it's cycle objects }

    { Fill in cycle number if file cycle object. }
    IF pde^.entry_type = fmc$file_cycle_object THEN
      clp$convert_integer_to_string (pde^.cycle_number, 10, FALSE, cycle_string, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      path (pde^.cumulative_parental_path_size + 1, 1) := '.';
      path (pde^.cumulative_parental_path_size + 2, cycle_string.size) := cycle_string.value;
      path_length := pde^.cumulative_parental_path_size + cycle_string.size + 1;
      { Move up the tree. }
      pde := pde^.parental_path_entry;
    ELSE
      path_length := pde^.cumulative_parental_path_size + pde^.path_node_name.size + 1;
    IFEND;

    { Fill in each path element name from last to first. }
    REPEAT
      path (pde^.cumulative_parental_path_size + 1, 1) := '.';
      path (pde^.cumulative_parental_path_size + 2, pde^.path_node_name.size) := pde^.path_node_name.value;
      pde := pde^.parental_path_entry;
    UNTIL pde = NIL;
    path (1, 1) := ':';

  PROCEND get_path;

?? TITLE := 'PROCEDURE output_fap_layer', EJECT ??

  PROCEDURE output_fap_layer
    (    layer_number: amt$fap_layer_number;
         fap_layer: bat$fap_descriptor;
         output_fid: amt$file_identifier;
         indent: bat$display_tables_indention;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      output_string: string (bat$display_tables_str_length),
      output_length: integer;

    STRINGREP (output_string, output_length, ' ': indent + 4, 'fap_layer : ',
          layer_number);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent + 8,
          'access_method : ', fap_layer.access_method);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent + 8,
          'structure_pointer : ', fap_layer.structure_pointer);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent + 8, 'loaded_ring : ',
          fap_layer.loaded_ring);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (output_string, output_length, ' ': indent + 8, 'layer_closed : ',
          fap_layer.layer_closed);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND output_fap_layer;

?? TITLE := 'PROCEDURE put_source', EJECT ??

  PROCEDURE put_source
    (    output_fid: amt$file_identifier;
         source: amt$attribute_source;
         indent: bat$display_tables_indention;
     VAR status: ost$status);

    VAR
      ba: amt$file_byte_address,
      output_length: integer,
      output_string: string (bat$display_tables_str_length),
      source_string: ost$name;


    status.normal := TRUE;

    CASE source OF
    = amc$undefined_attribute =
      source_string := 'amc$undefined_attribute';
    = amc$local_file_information =
      source_string := 'amc$local_file_information';
    = amc$change_file_attributes =
      source_string := 'amc$change_file_attributes';
    = amc$open_request =
      source_string := 'amc$open_request';
    = amc$file_reference =
      source_string := 'amc$file_reference';
    = amc$file_command =
      source_string := 'amc$file_command';
    = amc$file_request =
      source_string := 'amc$file_request';
    = amc$add_to_file_description =
      source_string := 'amc$add_to_file_description';
    = amc$access_method_default =
      source_string := 'amc$access_method_default';
    = amc$store_request =
      source_string := 'amc$store_request';
    ELSE
      source_string := 'INVALID SOURCE';
    CASEND;

    STRINGREP (output_string, output_length, ' ': indent + 4, 'source : ', source_string);
    amp$put_next (output_fid, ^output_string, output_length, ba, status);

  PROCEND put_source;

MODEND bam$display_tables;

