?? NEWTITLE := 'NOS/VE Operator Facility : VED SS Display' ??
MODULE ofm$special_statistics_display;
?? RIGHT := 110 ??

{ VED SS Display

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc oss$job_paged_literal
*copyc oss$task_shared
*copyc osc$multiprocessor_constants
*copyc clt$value
*copyc clt$display_control
*copyc ost$cpu_idle_statistics
*copyc ost$data_id
*copyc ost$status
*copyc ost$string
*copyc rmt$recorded_vsn
*copyc tmt$wait_queue_statistics
?? POP ??
*copyc clp$close_display
*copy  clp$new_display_line
*copy  clp$put_display
*copyc dmp$get_allocation_info
*copyc dpp$clear_window
*copyc dpp$put_next_line
*copyc jmp$get_job_counts
*copyc ofp$build_system_line
*copyc ofp$open_display
*copyc osp$disestablish_cond_handler
*copyc osp$establish_block_exit_hndlr
*copyc osp$get_jm_mm_stats
*copyc osp$get_page_stats
*copyc osp$get_pio_unit_stats
*copyc osp$get_pp_unit_count
*copyc osp$get_rvsn_by_lun
*copyc pmp$binary_to_ascii_fit
*copyc cmv$logical_unit_table
*copyc dmv$active_volume_table
*copyc jmv$known_job_list
*copyc osv$task_shared_heap
*copyc qfv$current_kjl_limit
*copyc tmv$total_task_count

  VAR
*if false
    iov$lunvsns: [XREF] array [1 .. 100] of rmt$recorded_vsn,
*ifend
    iov$reject_address_buffer_full: [XREF] integer,
    iov$reject_interlock_set: [XREF] integer,
    iov$reject_requests_full: [XREF] integer,
    iov$reject_unit_queue_limit: [XREF] integer,
    iov$reject_down_unit: [XREF] integer,
    iov$reject_element_access: [XREF] integer,

    iov$total_queue_calls: [XREF] integer,
    iov$actual_requests_resolved: [XREF] integer,
    iov$read_priority_invoked: [XREF] integer,

    mmv$successful_error_retry: [XREF] integer,
    mmv$reject_availmod_relink_stat: [XREF] array [1 .. 6] of record
      relinked: integer,
      qflooded: integer,
      rejected: integer,
    recend,

    tmv$wait_queue_statistics: [XREF] tmt$wait_queue_statistics;

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

  TYPE
    unit_info = record
      unit: iot$logical_unit,
      count: integer,
    recend;

  TYPE
    t$column_pos = (c$cp_left, c$cp_middle, c$cp_right);

  CONST
    max_lines = 56, {=> 162 Disk Units 3*(56-2)
    non_incremental = FALSE;

  VAR
    title: [READ, oss$job_paged_literal] string (18) := 'Special Statistics',
    initial_str: [READ, oss$job_paged_literal] array [1 .. max_lines] of string (80) := [
{01} '',
{02} '  SYSTEM PAGE Qs             SUM OF JOB Qs          QUEUE COUNT BY VSN',
{03} '          Free:              Fixed:       ',
{04} '     Available:                JWS:       ',
{05} '     Avail-Mod:             L-Wait:       ',
{06} '         Wired:             Swap-R:       ',
{07} '                                          ',
{08} 'SYSTEM SHARED Qs            SITE SHARED Qs',
{09} ' Task Services:                 01:       ',
{10} '    PF Execute:                 02:       ',
{11} '    PF Non-Exe:                 03:       ',
{12} '  Device Files:                 04:       ',
{13} '   File Server:                 05:       ',
{14} '                                06:       ',
{15} '    I/O ERROR Qs                          ',
{16} '        Flawed:          I/O ERRORS       ',
{17} 'Shared I/O Err:            Recover:       ',
{18} '  Swap I/O Err:             Interm:       ',
{19} ' Job I/O Error:              Unrec:       ',
{20} 'SuccessRewrite:                           ',
{21} '                              TASKS       ',
{22} '     PAGE FAULTS             Total:       ',
{23} '   Available Q:              Ready:       ',
{24} 'AvailModifiedQ:             R-Swap:       ',
{25} '          Disk:                           ',
{26} '      New Page:            DEQUEUED       ',
{27} 'ValidPageTable:               Page:       ',
{28} ' No/Low Memory:                 IO:       ',
{29} '        Locked:             Memory:       ',
{30} 'PageTable Full:             S-Lock:       ',
{31} ' DM I/O Reject:             JobEvt:       ',
{32} 'Volume Unavail:             Volume:       ',
{33} '  Job Work Req:             Av-Mod:       ',
{34} '                                          ',
{35} '    INPUT/OUTPUT               JOBS       ',
{36} 'Transfer Count:              Known:       ',
{37} ' Total Q Count:           Deferred:       ',
{38} ' Read Requests:             Active:       ',
{39} 'Write Requests:            Swapped:       ',
{40} '                                          ',
{41} '     I/O REJECTS    Total        Increment',
{42} '       Q limit:                           ',
{43} '      req full:                           ',
{44} '   Addbuf full:                           ',
{45} '   Reject Lock:                           ',
{46} '   Reject Down:                           ',
{47} '   Reject Elem:                           ',
{48} '                                          ',
{49} 'AVAIL MOD STAT     Relinked  QFlooded     ',
{50} 'Pages from JWS IO                         ',
{51} 'Page  from JWS IO                         ',
{52} 'Page  from JOB IO                         ',
{53} '                                          ',
{54} 'Pages from JWS                            ',
{55} 'Page  from JWS                            ',
{56} 'Page  from JOB                            '];


?? OLDTITLE ??
?? NEWTITLE := '[XDCL] ofp$special_statistics_display', EJECT ??

  PROCEDURE [XDCL] ofp$special_statistics_display
    (    wid: dpt$window_id;
         display_name: ost$name;
         file_name: amt$local_file_name;
         initial_call: boolean;
     VAR status: ost$status);


    VAR
      previous_data_for_display: [STATIC, oss$task_shared] boolean := FALSE,
      prev_pf_p: [STATIC, oss$task_shared] ^ost$page_fault_stats := NIL,
      previous_server_pf_data: [STATIC, oss$task_shared] ^ost$page_fault_stats := NIL,
      previous_swap_data: [STATIC, oss$task_shared] ^ost$swap_stats := NIL,
      previous_total_reads: [STATIC, oss$task_shared] integer := 0,
      previous_total_writes: [STATIC, oss$task_shared] integer := 0,

      previous_address_buffer_full: [STATIC, oss$task_shared] integer := 0,
      previous_interlock_set: [STATIC, oss$task_shared] integer := 0,
      previous_requests_full: [STATIC, oss$task_shared] integer := 0,
      previous_unit_queue_limit: [STATIC, oss$task_shared] integer := 0,
      previous_down_unit: [STATIC, oss$task_shared] integer := 0,
      previous_element_access: [STATIC, oss$task_shared] integer := 0,
      previous_reject_amod_relink_st: [STATIC, oss$task_shared] array [1 .. 6] of record
        relinked: integer,
        qflooded: integer,
        rejected: integer,
      recend := [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]],
      system_line_info: [STATIC, oss$task_shared] ^oft$system_line_info := NIL;

    VAR
      allocation_info: dmt$allocation_info,
      avt_index: dmt$active_volume_table_index,
      column_pos: t$column_pos,
      display_control: clt$display_control,
      found: boolean,
      i: integer,
      j: integer,
      jmmmd_p: ^ost$jm_mm_stats,
{     k: integer,
      line_count: integer,
      lun: iot$logical_unit,
      pfd_p: ^ost$page_fault_stats,
      pio_unit_p: ^ost$disk_unit_stats,
      pp_count: integer,
      q_counts_p: ^array [mmt$page_frame_queue_id] of 0 .. 0ffffffff(16),
      server_pfd_p: ^ost$page_fault_stats,
      str: array [1 .. max_lines] of string (80),
      total_disk_intermediate_errors: integer,
      total_disk_recovered_errors: integer,
      total_disk_unrecovered_errors: integer,
      total_queue_count: integer,
      total_reads: integer,
      total_transfer_count: integer,
      total_writes: integer,
      unit_count: integer,
      unit_interface_table: ^iot$unit_interface_table,
      units: integer,
      vsn: rmt$recorded_vsn;

?? NEWTITLE := 'abort_handler', EJECT ??

{ PURPOSE:
{   This procedure provides clean-up processing when a task abort occurs.

    PROCEDURE abort_handler
      (    condition: pmt$condition;
           condition_information_p: ^pmt$condition_information;
           save_area_p: ^ost$stack_frame_save_area;
       VAR handler_status: ost$status);

      VAR
        ignore_status: ost$status;

      IF wid = 0 THEN
        clp$close_display (display_control, ignore_status);
      IFEND;

    PROCEND abort_handler;
?? OLDTITLE ??
?? EJECT ??
    status.normal := TRUE;
    str := initial_str;

    PUSH jmmmd_p;
    osp$get_jm_mm_stats (non_incremental, jmmmd_p^, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    PUSH pfd_p;
    PUSH server_pfd_p;
    osp$get_page_stats (non_incremental, pfd_p^, server_pfd_p^, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    total_reads := 0;
    total_writes := 0;
    total_disk_intermediate_errors := 0;
    total_disk_recovered_errors := 0;
    total_disk_unrecovered_errors := 0;
    total_queue_count := 0;
    total_reads := 0;
    total_transfer_count := 0;
    total_writes := 0;
    osp$get_pp_unit_count (pp_count, unit_count, status);
    IF unit_count = 0 THEN
      RETURN; {----->
    IFEND;

    PUSH pio_unit_p: [1 .. unit_count];
    osp$get_pio_unit_stats (non_incremental, pio_unit_p^, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

{ Establish base values for the general statistics display if they do not already exist.
    IF NOT previous_data_for_display THEN
      ALLOCATE prev_pf_p IN osv$task_shared_heap^;
      prev_pf_p^ := pfd_p^;
      ALLOCATE system_line_info IN osv$task_shared_heap^;
      system_line_info^.initialized := FALSE;
      ALLOCATE previous_server_pf_data IN osv$task_shared_heap^;
      previous_server_pf_data^ := server_pfd_p^;
      previous_data_for_display := TRUE;
    IFEND;

{ Set up the cpu idle-statistics and the NOS percentage.

    ofp$build_system_line (system_line_info^, str [1]);

{SYSTEM PAGE Qs (left)
    q_counts_p := ^jmmmd_p^.jm_mm_stats.page_q_counts.q_counts;
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_free], 10, 10, 10, str [3] (16, 10));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_avail], 10, 10, 10, str [4] (16, 10));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_avail_modified], 10, 10, 10, str [5] (16, 10));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_wired], 10, 10, 10, str [6] (16, 10));

{SYSTEM SHARED Qs (left)
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_shared_task_service], 10, 10, 10, str [9] (16, 10));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_shared_pf_execute], 10, 10, 10, str [10] (16, 10));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_shared_pf_non_execute], 10, 10, 10, str [11] (16, 10));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_shared_device_file], 10, 10, 10, str [12] (16, 10));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_shared_file_server], 10, 10, 10, str [13] (16, 10));

{I/O ERROR Qs (left)
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_flawed], 10, 10, 10, str [16] (16, 10));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_shared_io_error], 10, 10, 10, str [17] (16, 10));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_swapped_io_error], 10, 10, 10, str [18] (16, 10));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_job_io_error], 10, 10, 10, str [19] (16, 10));
    pmp$binary_to_ascii_fit (mmv$successful_error_retry, 10, 10, 10, str [20] (16, 10));

{SUM OF JOB Qs (middle)
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_job_fixed], 10, 7, 7, str [3] (36, 7));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_job_working_set], 10, 7, 7, str [4] (36, 7));
    pmp$binary_to_ascii_fit (jmmmd_p^.jm_mm_stats.page_q_counts.long_wait_count, 10, 7, 7, str [5] (36, 7));
    pmp$binary_to_ascii_fit (jmmmd_p^.jm_mm_stats.page_q_counts.swap_resident_count, 10, 7, 7, str [6] (36,
          7));

{SITE SHARED Qs (middle)
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_shared_site_01], 10, 7, 7, str [9] (36, 7));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_shared_site_02], 10, 7, 7, str [10] (36, 7));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_shared_site_03], 10, 7, 7, str [11] (36, 7));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_shared_site_04], 10, 7, 7, str [12] (36, 7));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_shared_site_05], 10, 7, 7, str [13] (36, 7));
    pmp$binary_to_ascii_fit (q_counts_p^ [mmc$pq_shared_site_06], 10, 7, 7, str [14] (36, 7));

{PAGE FAULTS (left)
    pmp$binary_to_ascii_fit (pfd_p^.pf_stats [01] - prev_pf_p^.pf_stats [01], 10, 10, 10, str [23] (16, 10));
    pmp$binary_to_ascii_fit (pfd_p^.pf_stats [02] - prev_pf_p^.pf_stats [02], 10, 10, 10, str [24] (16, 10));
    pmp$binary_to_ascii_fit (pfd_p^.pf_stats [07] - prev_pf_p^.pf_stats [07], 10, 10, 10, str [25] (16, 10));
    pmp$binary_to_ascii_fit (pfd_p^.pf_stats [10] - prev_pf_p^.pf_stats [10], 10, 10, 10, str [26] (16, 10));
    pmp$binary_to_ascii_fit (pfd_p^.pf_stats [03] - prev_pf_p^.pf_stats [03], 10, 10, 10, str [27] (16, 10));
    i := pfd_p^.pf_stats [4] + pfd_p^.pf_stats [5] - prev_pf_p^.pf_stats [4] - prev_pf_p^.pf_stats [5];
    pmp$binary_to_ascii_fit (i, 10, 10, 10, str [28] (16, 10));
    pmp$binary_to_ascii_fit (pfd_p^.pf_stats [06] - prev_pf_p^.pf_stats [06], 10, 10, 10, str [29] (16, 10));
    pmp$binary_to_ascii_fit (pfd_p^.pf_stats [08] - prev_pf_p^.pf_stats [08], 10, 10, 10, str [30] (16, 10));
    pmp$binary_to_ascii_fit (pfd_p^.pf_stats [09] - prev_pf_p^.pf_stats [09], 10, 10, 10, str [31] (16, 10));
    pmp$binary_to_ascii_fit (pfd_p^.pf_stats [14] - prev_pf_p^.pf_stats [14], 10, 10, 10, str [32] (16, 10));
    pmp$binary_to_ascii_fit (pfd_p^.pf_stats [18] - prev_pf_p^.pf_stats [18], 10, 10, 10, str [33] (16, 10));

{TASKS (middle) (INPUT/OUTPUT (left) & I/O ERRORS (middle) are output later (after Logical Unit Table loop)).
    pmp$binary_to_ascii_fit (tmv$total_task_count, 10, 7, 7, str [22] (36, 7));
    pmp$binary_to_ascii_fit (jmmmd_p^.jm_mm_stats.total_ready_tasks, 10, 7, 7, str [23] (36, 7));
    pmp$binary_to_ascii_fit (jmmmd_p^.jm_mm_stats.total_ready_but_swapped_tasks, 10, 7, 7, str [24] (36, 7));

{TASKS (DEQUEUED)
    pmp$binary_to_ascii_fit (tmv$wait_queue_statistics [tmc$ts_page_wait], 10, 7, 7, str [27] (36, 7));
    pmp$binary_to_ascii_fit (tmv$wait_queue_statistics [tmc$ts_io_wait_queued], 10, 7, 7, str [28] (36, 7));
    pmp$binary_to_ascii_fit (tmv$wait_queue_statistics [tmc$ts_memory_wait], 10, 7, 7, str [29] (36, 7));
    pmp$binary_to_ascii_fit (tmv$wait_queue_statistics [tmc$ts_segment_lock_wait], 10, 7, 7, str [30]
          (36, 7));
    pmp$binary_to_ascii_fit (tmv$wait_queue_statistics [tmc$ts_job_event_queue], 10, 7, 7, str [31] (36, 7));
    pmp$binary_to_ascii_fit (tmv$wait_queue_statistics [tmc$ts_volume_unavailable], 10, 7, 7, str [32]
          (36, 7));
    pmp$binary_to_ascii_fit (tmv$wait_queue_statistics [tmc$ts_avail_mod_q_full_wait], 10, 7, 7, str [33]
          (36, 7));

{JOBS (middle)
    i := qfv$current_kjl_limit - jmv$known_job_list.state_data [jmc$kjl_unused_entry].number_of_entries;
    pmp$binary_to_ascii_fit (i, 10, 7, 7, str [36] (36, 7));
    pmp$binary_to_ascii_fit (jmv$known_job_list.state_data [jmc$kjl_deferred_entry].number_of_entries, 10, 7,
          7, str [37] (36, 7));
    pmp$binary_to_ascii_fit (jmmmd_p^.jm_mm_stats.total_active_jobs, 10, 7, 7, str [38] (36, 7));
    pmp$binary_to_ascii_fit (jmmmd_p^.jm_mm_stats.total_swapped_jobs, 10, 7, 7, str [39] (36, 7));

{QUEUE COUNT BY VSN (right)
    IF cmv$logical_unit_table = NIL THEN
      RETURN; {----->
    IFEND;

    j := 3;
    units := 0;
    column_pos := c$cp_left;

  /display_units/
    FOR i := LOWERBOUND (cmv$logical_unit_table^) TO UPPERBOUND (cmv$logical_unit_table^) DO
      IF cmv$logical_unit_table^ [i].configured THEN
        unit_interface_table := cmv$logical_unit_table^ [i].unit_interface_table;
        IF unit_interface_table <> NIL THEN
          IF (unit_interface_table^.unit_type >= ioc$lowest_disk_unit) AND
                (unit_interface_table^.unit_type <= ioc$highest_disk_unit) THEN
            lun := unit_interface_table^.logical_unit;
            osp$get_rvsn_by_lun (lun, vsn, found);
            IF NOT found THEN
              vsn := '      ';
            IFEND;
            IF NOT unit_interface_table^.unit_status.disabled THEN
              total_queue_count := total_queue_count + unit_interface_table^.queue_count;
              CASE column_pos OF
              = c$cp_left =
                str [j] (45, 6) := vsn (1, 6);
                pmp$binary_to_ascii_fit (unit_interface_table^.queue_count, 10, 3, 3, str [j] (52, 3));
                column_pos := c$cp_middle;

              = c$cp_middle =
                str [j] (58, 6) := vsn (1, 6);
                pmp$binary_to_ascii_fit (unit_interface_table^.queue_count, 10, 3, 3, str [j] (65, 3));
                column_pos := c$cp_right;

              ELSE {c$cp_right
                str [j] (71, 6) := vsn (1, 6);
                pmp$binary_to_ascii_fit (unit_interface_table^.queue_count, 10, 3, 3, str [j] (78, 3));
                column_pos := c$cp_left;
                IF j = max_lines THEN
                  EXIT /display_units/; {----->
                ELSE
                  j := j + 1;
                IFEND;
              CASEND;
            IFEND;
          IFEND;
        IFEND;
      IFEND;
    FOREND /display_units/;

{Calculate the TOTAL TRANSFER COUNT

  /calculate_transfer_count/
    FOR avt_index := LOWERBOUND (dmv$active_volume_table.table_p^)
          TO UPPERBOUND (dmv$active_volume_table.table_p^) DO
      IF dmv$active_volume_table.table_p^ [avt_index].entry_available OR dmv$active_volume_table.
            table_p^ [avt_index].mass_storage.volume_unavailable THEN
        CYCLE /calculate_transfer_count/; {----->
      IFEND;

      dmp$get_allocation_info (dmv$active_volume_table.table_p^ [avt_index].mass_storage.recorded_vsn,
            avt_index, allocation_info, status);

      IF status.normal THEN
        total_transfer_count := total_transfer_count + allocation_info.device_log_count;
      IFEND;

    FOREND /calculate_transfer_count/;

{ Set up the input/output statistics.
    FOR i := 1 TO unit_count DO
      IF pio_unit_p^.disk_unit_stats [i].unit_used THEN
        total_writes := total_writes + pio_unit_p^.disk_unit_stats [i].write_requests +
              pio_unit_p^.disk_unit_stats [i].swap_out_requests;
        total_reads := total_reads + pio_unit_p^.disk_unit_stats [i].read_requests +
              pio_unit_p^.disk_unit_stats [i].swap_in_requests;
        total_disk_recovered_errors := total_disk_recovered_errors +
              pio_unit_p^.disk_unit_stats [i].recovered_errors;
        total_disk_intermediate_errors := total_disk_intermediate_errors +
              pio_unit_p^.disk_unit_stats [i].intermediate_errors;
        total_disk_unrecovered_errors := total_disk_unrecovered_errors +
              pio_unit_p^.disk_unit_stats [i].unrecovered_errors;
      IFEND;
    FOREND;

    IF previous_total_reads = 0 THEN {First time through the display for this task}
      previous_total_reads := total_reads;
      previous_total_writes := total_writes;

      previous_address_buffer_full := iov$reject_address_buffer_full;
      previous_interlock_set := iov$reject_interlock_set;
      previous_requests_full := iov$reject_requests_full;
      previous_unit_queue_limit := iov$reject_unit_queue_limit;
      previous_down_unit := iov$reject_down_unit;
      previous_element_access := iov$reject_element_access;
      previous_reject_amod_relink_st := mmv$reject_availmod_relink_stat;
    IFEND;

{INPUT/OUTPUT (left)
    pmp$binary_to_ascii_fit (total_transfer_count, 10, 10, 10, str [36] (16, 10));
    pmp$binary_to_ascii_fit (total_queue_count, 10, 10, 10, str [37] (16, 10));
    pmp$binary_to_ascii_fit (total_writes - previous_total_writes, 10, 10, 10, str [38] (16, 10));
    pmp$binary_to_ascii_fit (total_reads - previous_total_reads, 10, 10, 10, str [39] (16, 10));

    prev_pf_p^ := pfd_p^;
    previous_server_pf_data^ := server_pfd_p^;
    previous_total_reads := total_reads;
    previous_total_writes := total_writes;

{I/O ERRORS (middle)
    pmp$binary_to_ascii_fit (total_disk_recovered_errors, 10, 7, 7, str [17] (36, 7));
    pmp$binary_to_ascii_fit (total_disk_intermediate_errors, 10, 7, 7, str [18] (36, 7));
    pmp$binary_to_ascii_fit (total_disk_unrecovered_errors, 10, 7, 7, str [19] (36, 7));

{I/O REJECTS (left)
{  Total Counts
    pmp$binary_to_ascii_fit (iov$reject_unit_queue_limit, 10, 10, 10, str [42] (16, 10));
    pmp$binary_to_ascii_fit (iov$reject_requests_full, 10, 10, 10, str [43] (16, 10));
    pmp$binary_to_ascii_fit (iov$reject_address_buffer_full, 10, 10, 10, str [44] (16, 10));
    pmp$binary_to_ascii_fit (iov$reject_interlock_set, 10, 10, 10, str [45] (16, 10));
    pmp$binary_to_ascii_fit (iov$reject_down_unit, 10, 10, 10, str [46] (16, 10));
    pmp$binary_to_ascii_fit (iov$reject_element_access, 10, 10, 10, str [47] (16, 10));

{  Incremental Counts
    pmp$binary_to_ascii_fit (iov$reject_unit_queue_limit - previous_unit_queue_limit, 10, 10, 10,
          str [42] (33, 10));
    pmp$binary_to_ascii_fit (iov$reject_requests_full - previous_requests_full, 10, 10, 10, str [43]
          (33, 10));
    pmp$binary_to_ascii_fit (iov$reject_address_buffer_full - previous_address_buffer_full, 10, 10, 10,
          str [44] (33, 10));
    pmp$binary_to_ascii_fit (iov$reject_interlock_set - previous_interlock_set, 10, 10, 10, str [45]
          (33, 10));
    pmp$binary_to_ascii_fit (iov$reject_down_unit - previous_down_unit, 10, 10, 10, str [46] (33, 10));
    pmp$binary_to_ascii_fit (iov$reject_element_access - previous_element_access, 10, 10, 10, str [47] (33,
          10));

    previous_address_buffer_full := iov$reject_address_buffer_full;
    previous_interlock_set := iov$reject_interlock_set;
    previous_requests_full := iov$reject_requests_full;
    previous_unit_queue_limit := iov$reject_unit_queue_limit;
    previous_down_unit := iov$reject_down_unit;
    previous_element_access := iov$reject_element_access;
    previous_reject_amod_relink_st := mmv$reject_availmod_relink_stat;

{AVAIL MOD STAT (left)
{ Total & Inc. Reject of Relinks to the Avail Mod Q (due to mmv$avail_modified_queue_max)
    FOR i := 1 TO 3 DO
{     IO Active
      pmp$binary_to_ascii_fit (mmv$reject_availmod_relink_stat [2 * i - 1].relinked, 10, 8, 8,
            str [i + 49] (20, 8));
      pmp$binary_to_ascii_fit (mmv$reject_availmod_relink_stat [2 * i - 1].qflooded, 10, 8, 8,
            str [i + 49] (30, 8));
{     No IO Active
      pmp$binary_to_ascii_fit (mmv$reject_availmod_relink_stat [2 * i].relinked, 10, 8, 8, str [i + 53] (20,
            8));
      pmp$binary_to_ascii_fit (mmv$reject_availmod_relink_stat [2 * i].qflooded, 10, 8, 8, str [i + 53] (30,
            8));
    FOREND;

{Open Output File
    IF wid = 0 THEN
      osp$establish_block_exit_hndlr (^abort_handler);
    IFEND;

    IF initial_call THEN
      ofp$open_display (file_name, wid, dpc$wc_sharing, dpc$wk_table, title, display_control, status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;
    IFEND;


{ Display the results.
    line_count := max_lines;
    WHILE (str [line_count] = '') AND (line_count > 1) DO
      line_count := line_count - 1;
    WHILEND;

    IF wid <> 0 THEN
      dpp$clear_window (wid, status);
      FOR i := 1 TO line_count DO
        dpp$put_next_line (wid, str [i], status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
      FOREND
    ELSE
      FOR i := 1 TO line_count DO
        clp$put_display (display_control, str [i], clc$trim, status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
      FOREND;
      clp$close_display (display_control, status);
      osp$disestablish_cond_handler;
    IFEND;

  PROCEND ofp$special_statistics_display;
?? OLDTITLE ??
MODEND ofm$special_statistics_display
