?? RIGHT := 110 ??
?? TITLE := 'NOS/VE System Core Debugger: Display Job Tables command' ??
MODULE sym$debug1;
{
{ PURPOSE:
{   This module contains the processor for the subcommand DISPLAY_JOB_TABLES of the System Core Debugger
{   utility.
{
{ NOTE:
{   Additions/deletions/changes to the commands and displays in this module and SYM$DEBUG may require an
{   update to the System Performance and Analysis Manual, Volume 2 (SPAM).
{
??  PUSH (LISTEXT := ON) ??
*copyc amc$condition_code_limits
*copyc ame$lfn_program_actions
*copyc cle$ecc_lexical
*copyc cmt$logical_unit_table
*copyc dmt$active_volume_table
*copyc dmt$system_tape_table
*copyc dpt$window_id
*copyc fmt$cycle_description
*copyc fmt$path_description_entry
*copyc fmt$path_description_unit
*copyc fmt$path_handle
*copyc fsc$max_path_size
*copyc lgt$log_read_activity
*copyc lot$loader_type_definitions
*copyc lot$task_services_entry_point
*copyc mmd$segment_access_condition
*copyc osc$processor_defined_registers
*copyc osc$purge_map_and_cache
*copyc osd$conditions
*copyc osd$integer_limits
*copyc osd$registers
*copyc osd$virtual_address
*copyc oss$job_fixed
*copyc oss$mainframe_pageable
*copyc oss$mainframe_paged_literal
*copyc ost$caller_identifier
*copyc ost$execution_control_block
*copyc ost$processor_id
*copyc ost$status
*copyc ost$string
*copyc pmd$system_log_interface
*copyc pmt$processor_attributes
*copyc rmc$highest_unit_type
*copyc syt$debug_control
*copyc syt$value_kinds
*copyc tmt$broken_task_monitor_fault
*copyc tmt$mcr_faults
*copyc tmt$signal
*copyc tmt$signal_buffer
*copyc tmt$signal_buffers
?? POP ??
?? NEWTITLE := '  External procedures and variables referenced in this module', EJECT ??

*copyc clp$check_name_for_path_handle
*copyc clp$trimmed_string_size
*copyc dmp$get_mat_pointer
*copyc osp$set_status_abnormal
*copyc syp$convert_bytes
*copyc syp$crack_command
*copyc syp$display_bam_tables
*copyc syp$display_files
*copyc syp$display_global_file_info
*copyc syp$display_paths
*copyc syp$display_pde
*copyc syp$verify_access
*copyc syp$write_output_header
*copyc syp$write_output_line
*copyc cmv$logical_pp_table_p
*copyc cmv$logical_unit_table
*copyc dmv$active_volume_table
*copyc dmv$p_system_tape_table
*copyc mmv$tables_initialized
*copyc mtv$cst0
*copyc osv$cpus_physically_configured
*copyc syv$db_displayed_console_lines
*copyc syv$debug_line_count
*copyc syv$dump_to_pf
*copyc syv$job_template_ptr_array
?? OLDTITLE ??
?? NEWTITLE := '  TYPE definitions for data structures used in this module', EJECT ??

  TYPE

{ Converts an integer to an sfid

    sfid_converter = record
      case input_type: (sfid, int) of
      = sfid =
        fluff: 0 .. 0ffffffff(16),
        sfid: gft$system_file_identifier,
     = int =
        int: integer,
     casend,
   recend;

?? OLDTITLE ??
?? NEWTITLE := '  CONST definitions for data structures used in this module', EJECT ??

  CONST
    dbe$ = 900000,
    add_to_eol = TRUE;

?? OLDTITLE ??
?? NEWTITLE := '  Parameter_descriptor_table for DISPLAY_JOB_TABLES command', EJECT ??

{ DISPLAY_JOB_TABLES parameter descriptor table:

  VAR
    syv$jfile_pdt: [XDCL, READ, oss$mainframe_paged_literal] array [1 .. 3] of syt$parameter_descriptor := [
{   } [FALSE, 1, 'p_h_name', syc$name_value, * ],
{   } [FALSE, 2, 'option', syc$name_value, * ],
{   } [FALSE, 3, 'id    ', syc$integer_value, 0, 0, 0ffffffff(16)]];

?? OLDTITLE ??
?? NEWTITLE := '  SYP$JOBFILEPROC', EJECT ??

  PROCEDURE [XDCL] syp$jobfileproc
    (    text: string ( * );
         id: dpt$window_id;
     VAR status: ost$status);

    VAR
      allocation_units: dmt$dau_address,
      allocator: [READ, oss$mainframe_paged_literal] array [dmt$allocation_styles] of string (6) := ['A0   =',
        'A1   =', 'A2   =', 'A3   =', 'A4   =', 'A5   =', 'A6   =', 'A7   =', 'A8   =', 'ACYL ='],
      avt: dmt$active_volume_table_entry,
      blank: string (4),
      cd: fmt$cycle_description,
      cl_path_handle: clt$path_handle,
      cst: ost$cpu_state_table,
      cst_index: ost$processor_id,
      fmv$highest_pdu_offset: ost$segment_offset,
      fmv$initial_pdu_pointer: ^fmt$path_description_unit,
      fmv$pde_assignment_counter: integer,
      found: boolean,
      gfi: bat$global_file_information,
      ignore_status: ost$status,
      index: integer,
      j: integer,
      length: integer,
      lfn: amt$local_file_name,
      lpt: cmt$logical_pp_table_entry,
      lut: cmt$logical_unit,
      mat: ^dmt$mainframe_allocation_table,
      msg: string (75),
      pde: ^fmt$path_description_entry,
      pointer_to_initial_pdu_pointer: ^^fmt$path_description_unit,
      pvt: array [1 .. 3] of syt$parameter_value,
      sfid: gft$system_file_identifier,
      sfid_var_converter: sfid_converter,
      str: string(60),
      stt : dmt$system_tape_table_entry,
      style: dmt$allocation_styles,
      task_status_translations: [READ, oss$mainframe_paged_literal] array [tmt$task_status] of string (24) :=
{           tmc$ts_null                     } ['NULL                    ',
{           tmc$ts_ready                    } 'READY                   ',
{           tmc$ts_ready_and_selected       } 'READY_AND_SELECTED      ',
{           tmc$ts_timeout_reqexp_shortshrt } 'TIMEOUT_REQEXP_SHORTSHRT',
{           tmc$ts_timeout_reqexp_longlong  } 'TIMEOUT_REQEXP_LONGLONG ',
{           tmc$ts_timeout_reqexp_longvlong } 'TIMEOUT_REQEXP_LONGVLONG',
{           tmc$ts_timed_wait_not_queued    } 'TIMED_WAIT_NOT_QUEUED   ',
{           tmc$ts_executing                } 'EXECUTING               ',
{           tmc$ts_timeout_reqexp_inflong   } 'TIMEOUT_REQEXP_INFLONG  ',
{           tmc$ts_timeout_reqexp_infvlong  } 'TIMEOUT_REQEXP_INFVLONG ',
{           tmc$ts_ready_but_swapped        } 'READY_BUT_SWAPPED       ',
{           tmc$ts_io_wait_not_queued       } 'IO_WAIT_NOT_QUEUED      ',
{           tmc$ts_page_wait                } 'PAGE_WAIT               ',
{           tmc$ts_memory_wait              } 'MEMORY_WAIT             ',
{           tmc$ts_segment_lock_wait        } 'SEGMENT_LOCK_WAIT       ',
{           tmc$ts_job_event_queue          } 'JOB_EVENT_QUEUE         ',
{           tmc$ts_io_wait_queued           } 'IO_WAIT_QUEUED          ',
{           tmc$ts_volume_unavailable       } 'VOLUME_UNAVAILABLE      ',
{           tmc$ts_avail_mod_q_full_wait    } 'AVAIL_MOD_Q_FULL_WAIT   '],
      unit_type : rmt$tape_unit_types;

{ The following *copyc is needed within the procedure because it is dependent on
{ the existance of fmv$initial_pdu_pointer & fmv$highest_pdu_offset which are
{ variables in job_pageable and used by this common routine.
*copyc fmp$locate_pde_via_path_handle


    status.normal := TRUE;
    syv$db_displayed_console_lines := 0;
    syv$debug_line_count := 0;
    IF (syv$job_template_ptr_array = NIL) OR (UPPERBOUND (syv$job_template_ptr_array^) < 4) THEN
      osp$set_status_abnormal ('DB', dbe$, 'not available', status);
      RETURN;
    IFEND;

    blank := '    ';

    syp$crack_command (syv$jfile_pdt, text, pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF syv$dump_to_pf THEN
      syp$write_output_header (' DISPLAY JOB TABLES ', text);
    IFEND;

    syp$verify_access (syc$readable, #LOC (syv$job_template_ptr_array^ [4]), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    pointer_to_initial_pdu_pointer := syv$job_template_ptr_array^ [4];
    fmv$initial_pdu_pointer := pointer_to_initial_pdu_pointer^;
    fmv$highest_pdu_offset := osc$maximum_offset;
    fmv$pde_assignment_counter := osc$max_integer;

    IF NOT pvt [1].defined THEN
      lfn := 'NONE';
    ELSE
      lfn := pvt [1].name;
    IFEND;
    clp$check_name_for_path_handle (lfn, cl_path_handle);
    IF NOT (cl_path_handle.kind = clc$regular_path_handle) THEN
      IF lfn = 'BAM_TABLES' THEN
        syp$display_bam_tables (fmv$initial_pdu_pointer, status);
        RETURN;
      ELSEIF lfn = 'PATHS' THEN
        syp$display_paths (fmv$initial_pdu_pointer, status);
        RETURN;
      ELSEIF lfn = 'NONE' THEN

{ Use lfn of 'NONE' to allow display of other tables.

        IF NOT pvt [2].defined THEN
          syp$display_files (fmv$initial_pdu_pointer, status);
          RETURN;
        ELSEIF (pvt [2].name = 'GFI') OR (pvt [2].name = 'PDE') THEN
          msg := 'A file must be specified to display the "GFI" or "PDE".';
          syp$write_output_line (msg, status);
          RETURN;
        IFEND;
      ELSE
        msg := 'Parameter 1 must be a path_handle_name, "NONE", "PATHS", or "BAM_TABLES".';
        syp$write_output_line (msg, status);
        RETURN;
      IFEND;
    ELSE
      fmp$locate_pde_via_path_handle (cl_path_handle.regular_handle, pde, status);
      IF NOT status.normal THEN
        IF status.condition = fme$obsolete_path_handle THEN
          msg := 'Path handle name "';
          msg (19, *) := lfn;
          msg (clp$trimmed_string_size(lfn) + 19, *) := '" is obsolete.';
        ELSE
          msg := 'Path handle name "';
          msg (19, *) := lfn;
          msg (clp$trimmed_string_size(lfn) + 19, *) := '" is not known.';
        IFEND;
        status.normal := TRUE;
        syp$write_output_line (msg, status);
        RETURN;
      IFEND;

      IF (pde^.entry_type = fmc$file_cycle_object) AND (pde^.cycle_description <> NIL) THEN
        cd := pde^.cycle_description^;
        IF cd.device_class = rmc$mass_storage_device THEN
          sfid := cd.system_file_id;
        ELSEIF cd.device_class = rmc$magnetic_tape_device THEN
          sfid := cd.system_file_id;
        IFEND;
      ELSEIF (pvt [2].defined AND (pvt [2].name = 'PDE')) THEN

{ This is OK.

      ELSE
        msg := 'File "';
        msg (7, *) := lfn;
        msg (clp$trimmed_string_size(lfn) + 7, *) := '" is not known.';
        syp$write_output_line (msg, status);
        RETURN;
      IFEND;
    IFEND;

    IF NOT pvt [2].defined THEN

{ Display file pointer indicators

      syp$write_output_line (blank, status);

      msg := 'Path handle name = ';
      msg (20, * ) := lfn;
      syp$write_output_line (msg, status);

      msg := 'SFID = ';
      syp$convert_bytes (#LOC (sfid), #SIZE (sfid), msg, add_to_eol);
      syp$write_output_line (msg, status);

      IF cd.global_file_information <> NIL THEN
        msg := 'EOI = ';
        syp$convert_bytes (#LOC (cd.global_file_information^.eoi_byte_address), #SIZE (cd.
              global_file_information^.eoi_byte_address), msg, add_to_eol);
        syp$write_output_line (msg, status);
        msg := 'OPEN_COUNT = ';
        syp$convert_bytes (#LOC (cd.global_file_information^.open_count), #SIZE (cd.global_file_information^.
              open_count), msg, add_to_eol);
        syp$write_output_line (msg, status);
      ELSE
        msg := 'Cycle_description.global_file_information = NIL';
        syp$write_output_line (msg, status);
      IFEND;

      IF cd.attached_file AND cd.permanent_file THEN
        IF cd.apfid.family_location = pfc$local_mainframe THEN
          msg := 'LOCAL APFID';
          syp$convert_bytes (#LOC(cd.apfid.attached_pf_table_index),
                #SIZE(cd.apfid.attached_pf_table_index), msg, add_to_eol);
          syp$write_output_line (msg, status);
        ELSE
          msg := 'SERVER APFID';
          syp$convert_bytes (#LOC(cd.apfid), #SIZE(cd.apfid), msg, add_to_eol);
          syp$write_output_line (msg, status);
        IFEND;
      IFEND;
      RETURN;
    IFEND;

    FOR j := 1 TO 5 DO
      syp$write_output_line (blank, ignore_status);
    FOREND;

    IF pvt [2].name = 'GFI' THEN
      msg := 'GLOBAL FILE INFORMATION for file: ';
      msg (35, * ) := lfn;
      syp$write_output_line (msg, ignore_status);
      IF cd.global_file_information = NIL THEN
        msg := 'no global file information';
        syp$write_output_line (msg, ignore_status);
      ELSE
        syp$display_global_file_info (cd.global_file_information, {indent} 4, status);
      IFEND;
    ELSEIF pvt [2].name = 'PDE' THEN
      msg := 'PATH DESCRIPTION ENTRY for file: ';
      msg (34, * ) := lfn;
      syp$write_output_line (msg, ignore_status);
      syp$display_pde (pde, status);


    ELSEIF pvt [2].name = 'AVT' THEN
      msg := 'ACTIVE VOLUME TABLE ENTRY';
      syp$write_output_line (msg, status);
      syp$write_output_line (blank, status);

      IF (NOT pvt [3].defined) OR (pvt [3].int = 0) THEN
        FOR j := 1 TO UPPERBOUND (dmv$active_volume_table.table_p^) DO
          msg := 'vsn';
          syp$convert_bytes (#LOC (j), #SIZE (j), msg, add_to_eol);
          IF dmv$active_volume_table.table_p^ [j].entry_available THEN
            msg (8, * ) := ' not in use';
          ELSE
            syp$convert_bytes (#LOC (dmv$active_volume_table.table_p^ [j].mass_storage.recorded_vsn), #SIZE
                  (dmv$active_volume_table.table_p^ [j].mass_storage.recorded_vsn), msg, add_to_eol);
            syp$write_output_line (msg, status);
          IFEND;
        FOREND;
        RETURN;
      IFEND;

      IF (pvt [3].int < 1) OR (pvt [3].int > UPPERBOUND (dmv$active_volume_table.table_p^)) THEN
        msg := 'bad avt index';
        syp$write_output_line (msg, status);
        RETURN;
      IFEND;

      j := pvt [3].int;
      avt := dmv$active_volume_table.table_p^ [j];
      IF avt.entry_available THEN
        msg := 'avt not in use';
        syp$write_output_line (msg, status);
        RETURN;
      IFEND;

      msg := 'lock = ';
      syp$convert_bytes (#LOC (avt.lock), #SIZE (avt.lock), msg, add_to_eol);
      syp$write_output_line (msg, status);

      msg := 'logical_unit_number = ';
      syp$convert_bytes (#LOC (avt.logical_unit_number), #SIZE (avt.logical_unit_number), msg, add_to_eol);
      syp$write_output_line (msg, status);

        msg := 'allocation allowed = ';
        IF avt.mass_storage.allocation_allowed THEN
          msg (22, * ) := 'TRUE';
        ELSE
          msg (22, * ) := 'FALSE';
        IFEND;
        syp$write_output_line (msg, status);

        msg := 'class = ';
        syp$convert_bytes (#LOC (avt.mass_storage.class), #SIZE (avt.mass_storage.class), msg, add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'disk table status = ';
        IF dmc$table_update_in_progress IN avt.mass_storage.disk_table_status THEN
          msg (21, * ) := 'table update in progress';
        ELSEIF dmc$dflt_update_required IN avt.mass_storage.disk_table_status THEN
          msg (21, * ) := 'dflt update required';
        ELSEIF dmc$no_available_dflt_entries IN avt.mass_storage.disk_table_status THEN
          msg (21, * ) := 'no available dflt entries';
        ELSEIF dmc$table_update_inhibited IN avt.mass_storage.disk_table_status THEN
          msg (21, * ) := 'table update inhibited';
        IFEND;
        syp$write_output_line (msg, status);

        msg := 'update lock = ';
        syp$convert_bytes (#LOC (avt.mass_storage.update_lock), #SIZE (avt.mass_storage.update_lock), msg,
              add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'logging lock =';
        syp$convert_bytes (#LOC (avt.mass_storage.logging_lock), #SIZE (avt.mass_storage.logging_lock), msg,
              add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'internal vsn =';
        syp$convert_bytes (#LOC (avt.mass_storage.internal_vsn), #SIZE (avt.mass_storage.internal_vsn), msg,
              add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'allocation table =';
        syp$convert_bytes (#LOC (avt.mass_storage.p_device_allocation_table), #SIZE (avt.mass_storage.
              p_device_allocation_table), msg, add_to_eol);
        syp$write_output_line (msg, status);
        msg := 'device file list =';
        syp$convert_bytes (#LOC (avt.mass_storage.p_device_file_list_table), #SIZE (avt.mass_storage.
              p_device_file_list_table), msg, add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'device log =';
        syp$convert_bytes (#LOC (avt.mass_storage.p_device_log), #SIZE (avt.mass_storage.p_device_log), msg,
              add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'directory =';
        syp$convert_bytes (#LOC (avt.mass_storage.p_directory), #SIZE (avt.mass_storage.p_directory), msg,
              add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'login table =';
        syp$convert_bytes (#LOC (avt.mass_storage.p_login_table), #SIZE (avt.mass_storage.p_login_table), msg,
              add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'mainframe assigned =';
        syp$convert_bytes (#LOC (avt.mass_storage.mainframe_assigned), #SIZE (avt.mass_storage.
              mainframe_assigned), msg, add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'vsn = ';
        syp$convert_bytes (#LOC (avt.mass_storage.recorded_vsn), #SIZE (avt.mass_storage.recorded_vsn), msg,
              add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'setname =';
        syp$convert_bytes (#LOC (avt.mass_storage.set_name), #SIZE (avt.mass_storage.set_name), msg,
              add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'volume owner =';
        syp$convert_bytes (#LOC (avt.mass_storage.volume_owner), #SIZE (avt.mass_storage.volume_owner), msg,
              add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'log size =';
        syp$convert_bytes (#LOC (avt.mass_storage.allocated_log_size), #SIZE (avt.mass_storage.
              allocated_log_size), msg, add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'log offset =';
        syp$convert_bytes (#LOC (avt.mass_storage.current_position_offset_in_log), #SIZE (avt.mass_storage.
              current_position_offset_in_log), msg, add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'mat =';
        syp$convert_bytes (#LOC (avt.mass_storage.p_mat), #SIZE (avt.mass_storage.p_mat), msg, add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'mfl = ';
        syp$convert_bytes (#LOC (avt.mass_storage.p_mfl), #SIZE (avt.mass_storage.p_mfl), msg, add_to_eol);
        syp$write_output_line (msg, status);

      RETURN;

    ELSEIF pvt [2].name = 'MAT' THEN
      msg := 'MAINFRAME ALLOCATION TABLE';
      syp$write_output_line (msg, status);
      syp$write_output_line (blank, status);

      IF (NOT pvt [3].defined) OR (pvt [3].int = 0) THEN
        msg := 'bad mat index';
        syp$write_output_line (msg, status);
        RETURN;
      IFEND;
      j := pvt [3].int;
      IF NOT dmv$active_volume_table.table_p^ [j].entry_available THEN
        dmp$get_mat_pointer (j, mat);
      ELSE
        mat := NIL;
      IFEND;
      IF (mat = NIL) THEN
        msg := 'mat entry not in use';
        syp$write_output_line (msg, status);
        RETURN;
      IFEND;
      msg := 'bytes/dau =';
      syp$convert_bytes (#LOC (mat^.bytes_per_dau), #SIZE (mat^.bytes_per_dau), msg, add_to_eol);
      syp$write_output_line (msg, status);

      msg := 'bytes/mau =';
      syp$convert_bytes (#LOC (mat^.bytes_per_mau), #SIZE (mat^.bytes_per_mau), msg, add_to_eol);
      syp$write_output_line (msg, status);

      msg := 'maus/dau =';
      syp$convert_bytes (#LOC (mat^.maus_per_dau), #SIZE (mat^.maus_per_dau), msg, add_to_eol);
      syp$write_output_line (msg, status);

      msg := 'daus/position =';
      syp$convert_bytes (#LOC (mat^.daus_per_position), #SIZE (mat^.daus_per_position), msg, add_to_eol);
      syp$write_output_line (msg, status);

      msg := 'positions/device =';
      syp$convert_bytes (#LOC (mat^.positions_per_device), #SIZE (mat^.positions_per_device), msg,
            add_to_eol);
      syp$write_output_line (msg, status);

      msg := 'min file space =';
      syp$convert_bytes (#LOC (mat^.minimum_space), #SIZE (mat^.minimum_space), msg, add_to_eol);
      syp$write_output_line (msg, status);

      msg := 'max file space =';
      syp$convert_bytes (#LOC (mat^.maximum_space), #SIZE (mat^.maximum_space), msg, add_to_eol);
      syp$write_output_line (msg, status);

      msg := 'available allocation units';
      syp$write_output_line (msg, status);
      FOR style := LOWERVALUE (style) TO UPPERVALUE (style) DO
        allocation_units := mat^.available_allocation_units [style];
        msg := allocator [style];
        syp$convert_bytes (#LOC (allocation_units), #SIZE (allocation_units), msg, add_to_eol);
        syp$write_output_line (msg, status);
      FOREND;

      msg := 'available space =';
      syp$convert_bytes (#LOC (mat^.available_space), #SIZE (mat^.available_space), msg, add_to_eol);
      syp$write_output_line (msg, status);

      msg := 'leftover space =';
      syp$convert_bytes (#LOC (mat^.leftover_space), #SIZE (mat^.leftover_space), msg, add_to_eol);
      syp$write_output_line (msg, status);

      msg := 'MAT address =';
      syp$convert_bytes (#LOC (mat), 6, msg, add_to_eol);
      syp$write_output_line (msg, status);

    ELSEIF pvt [2].name = 'LUT' THEN
      msg := 'LOGICAL UNIT TABLE';
      syp$write_output_line (msg, status);
      syp$write_output_line (blank, status);

      IF cmv$logical_unit_table = NIL THEN
        msg := 'no lut active';
        syp$write_output_line (msg, status);
        RETURN;
      IFEND;

      FOR j := 1 TO UPPERBOUND (cmv$logical_unit_table^) DO
        lut := cmv$logical_unit_table^ [j];
        msg := 'logical unit entry #';
        syp$convert_bytes (#LOC (j), #SIZE (j), msg, add_to_eol);
        syp$write_output_line (msg, status);
        syp$write_output_line (blank, status);

        msg := 'CONFIGURED =';
        syp$convert_bytes (#LOC (lut.logical_unit_number), #SIZE (lut.logical_unit_number), msg, add_to_eol);
        syp$write_output_line (msg, status);


        msg := 'ENTRY INTERLOCK =';
        IF lut.entry_interlock THEN
          msg (19, * ) := 'TRUE';
        ELSE
          msg (19, * ) := 'FALSE';
        IFEND;
        syp$write_output_line (msg, status);

        msg := 'UNIT INTERFACE TABLE =';
        syp$convert_bytes (#LOC (lut.unit_interface_table), #SIZE (lut.unit_interface_table), msg,
              add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'ELEMENT CAPABILITY =';
        IF lut.element_capability >= $cmt$element_capabilities [cmc$io_request_submission] THEN
          msg (22, *) := ' ON';
        ELSEIF lut.element_capability = $cmt$element_capabilities [cmc$dedicated_maintenance,
              cmc$concurrent_maintenance] THEN
          msg (22, *) := ' DOWN';
        ELSEIF lut.element_capability = $cmt$element_capabilities [ ] THEN
          msg (22, *) := ' OFF';
        IFEND;
        syp$write_output_line (msg, status);

        msg := 'STATUS =';
        syp$convert_bytes (#LOC (lut.status), #SIZE (lut.status), msg, add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'ELEMENT ACCESS =';
        syp$convert_bytes (#LOC (lut.element_access), #SIZE (lut.element_access), msg, add_to_eol);
        syp$write_output_line (msg, status);

        CASE lut.status.assignable_device OF
        = TRUE =
          msg := 'ASSIGNED =';
          IF lut.status.assigned THEN
            msg (12, * ) := 'TRUE';
          ELSE
            msg (12, * ) := 'FALSE';
          IFEND;
          syp$write_output_line (msg, status);

          msg := 'ASSIGNED JSN =';
          syp$convert_bytes (#LOC (lut.status.assigned_jsn), #SIZE (lut.status.assigned_jsn), msg,
                add_to_eol);
          syp$write_output_line (msg, status);

        = FALSE =
        ELSE
        CASEND;
      FOREND;
    ELSEIF pvt [2].name = 'LPT' THEN
      msg := 'LOGICAL PP TABLE';
      syp$write_output_line (msg, status);

      IF cmv$logical_pp_table_p = NIL THEN
        msg := 'no lpt entries';
        syp$write_output_line (msg, status);
        RETURN;
      IFEND;

      FOR j := 1 TO UPPERBOUND (cmv$logical_pp_table_p^) DO

        lpt := cmv$logical_pp_table_p^ [j];
        msg := 'logical pp entry #';
        syp$convert_bytes (#LOC (j), #SIZE (j), msg, add_to_eol);
        syp$write_output_line (msg, status);
        syp$write_output_line (blank, status);

        msg := 'CONFIGURED =';
        IF lpt.flags.configured THEN
          msg (14, * ) := 'TRUE';
        ELSE
          msg (14, * ) := 'FALSE';
        IFEND;
        syp$write_output_line (msg, status);

        msg := 'ENTRY IN USE =';
        IF lpt.flags.entry_in_use THEN
          msg (19, * ) := 'TRUE';
        ELSE
          msg (19, * ) := 'FALSE';
        IFEND;
        syp$write_output_line (msg, status);

        msg := '   IOU =';
        syp$convert_bytes (#LOC (lpt.pp_info.channel.iou_number), #SIZE (lpt.pp_info.channel.iou_number),
              msg, add_to_eol);
        syp$write_output_line (msg, status);

        msg := '   CHANNEL LOCK =';
        syp$convert_bytes (#LOC (lpt.pp_info.channel_interlock_p), #SIZE (lpt.pp_info.channel_interlock_p),
              msg, add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'RESPONSE HANDLER =';
        syp$convert_bytes (#LOC (lpt.handlers.response_handler_p), #SIZE (lpt.handlers.response_handler_p),
              msg, add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'CONTROLLER TYPE =';
        syp$convert_bytes (#LOC (lpt.controller_info.controller_type),
              #SIZE (lpt.controller_info.controller_type), msg, add_to_eol);
        syp$write_output_line (msg, status);

        msg := 'DISABLED =';
        IF lpt.flags.disabled THEN
          msg (12, * ) := 'TRUE';
        ELSE
          msg (12, * ) := 'FALSE';
        IFEND;
        syp$write_output_line (msg, status);

        msg := 'PP_LOADED =';
        IF lpt.flags.pp_loaded THEN
          msg (13, * ) := 'TRUE';
        ELSE
          msg (13, * ) := 'FALSE';
        IFEND;
        syp$write_output_line (msg, status);

      FOREND;
    ELSEIF pvt [2].name = 'STT' then
      msg := 'SYSTEM TAPE TABLE';
      syp$write_output_line (msg, status);
      syp$write_output_line (blank, status);
      IF dmv$p_system_tape_table = NIL THEN
        msg := 'no stt entries';
        syp$write_output_line (msg, status);
        RETURN;
      IFEND;
      FOR unit_type := rmc$hd_pe TO rmc$highest_unit_type DO
        stt := dmv$p_system_tape_table ^[unit_type];
        IF stt.defined_tape <> 0 THEN
          msg := ' Unit type =';
          syp$convert_bytes (#LOC(unit_type), #SIZE(unit_type), msg, add_to_eol);
          syp$write_output_line (msg, status);
          syp$write_output_line (blank, status);
          msg := '   DEFINED UNITS =';
          syp$convert_bytes (#LOC(stt.defined_tape), #SIZE(stt.defined_tape), msg, add_to_eol);
          syp$write_output_line (msg, status);
          msg := '   NUMBER ON =';
          syp$convert_bytes (#LOC(stt.number_on), #SIZE(stt.number_on), msg, add_to_eol);
          syp$write_output_line (msg, status);
          msg := '   LOWER DENSITY RESERVED =';
          syp$convert_bytes (#LOC(stt.lower_density_reserved), #SIZE(stt.lower_density_reserved),
                msg, add_to_eol);
          syp$write_output_line (msg, status);
          msg := '   HIGHER DENSITY RESERVED =';
          syp$convert_bytes (#LOC(stt.higher_density_reserved), #SIZE(stt.higher_density_reserved),
                msg, add_to_eol);
          syp$write_output_line (msg, status);
        IFEND;
      FOREND;
    ELSEIF pvt [2].name = 'CST' then
      FOR cst_index := 0 TO (osv$cpus_physically_configured - 1) DO
        IF cst_index <> 0 THEN
          syp$write_output_line (blank, status);
        IFEND;

        msg := 'CPU STATE TABLE ';
        STRINGREP (msg (17, *), length, cst_index);
        syp$write_output_line (msg, status);
        syp$write_output_line (blank, status);

         cst:= mtv$cst0 [cst_index];
         msg := '  dispatching priority: ';
         syp$convert_bytes (#LOC (cst.dispatching_priority),  #SIZE (cst.dispatching_priority), msg,
               add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  dual state prior subpriority: ';
         syp$write_output_line (msg, status);
         msg := '    dual state priority: ';
         syp$convert_bytes (#LOC (cst.dual_state_prior_subpriority.dual_state_priority),
                 #SIZE (cst.dual_state_prior_subpriority.dual_state_priority), msg, add_to_eol);
         syp$write_output_line (msg, status);
         msg := '    subpriority: ';
         syp$convert_bytes (#LOC (cst.dual_state_prior_subpriority.subpriority),
                 #SIZE (cst.dual_state_prior_subpriority.subpriority), msg, add_to_eol);
         syp$write_output_line (msg,status);

         msg := '  memory port mask: ';
         syp$convert_bytes (#LOC (cst.memory_port_mask), #SIZE (cst.memory_port_mask), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  cst index: ';
         syp$convert_bytes (#LOC (cst.cst_index), #SIZE (cst.cst_index), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  processor state: ';
         IF cst.processor_state = cmc$on THEN
           msg (20, *) := 'ON';
         ELSEIF cst.processor_state = cmc$down THEN
           msg (20, *) := 'DOWN';
         ELSEIF cst.processor_state = cmc$off THEN
           msg (20, *) := 'OFF';
         ELSE
           syp$convert_bytes (#LOC (cst.processor_state), #SIZE (cst.processor_state), msg, add_to_eol);
         IFEND;
         syp$write_output_line (msg, status);

         msg := '  next processor state: ';
         IF cst.next_processor_state = cmc$on THEN
           msg (25, *) := 'ON';
         ELSEIF cst.next_processor_state = cmc$down THEN
           msg (25, *) := 'DOWN';
         ELSEIF cst.next_processor_state = cmc$off THEN
           msg (25, *) := 'OFF';
         ELSE
           syp$convert_bytes (#LOC (cst.next_processor_state), #SIZE (cst.next_processor_state), msg,
                 add_to_eol);
         IFEND;
         syp$write_output_line (msg, status);

         msg := '  cpu alive flag: ';
         syp$convert_bytes (#LOC (cst.cpu_alive_flag), #SIZE (cst.cpu_alive_flag), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  taskid: ';
         syp$convert_bytes (#LOC (cst.taskid), #SIZE (cst.taskid), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  ajlo: ';
         syp$convert_bytes (#LOC (cst.ajlo), #SIZE(cst.ajlo), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  dual state jps: ';
         syp$convert_bytes (#LOC (cst.dual_state_jps), #SIZE(cst.dual_state_jps), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  jcb_p: ';
         syp$convert_bytes (#LOC (cst.jcb_p), #SIZE (cst.jcb_p), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  xcb_p: ';
         syp$convert_bytes (#LOC (cst.xcb_p), #SIZE(cst.xcb_p), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  xcb rma: ';
         syp$convert_bytes (#LOC (cst.xcb_rma), #SIZE (cst.xcb_rma), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  dispatch control: ';
         syp$write_output_line (msg, status);
         msg := '    call_dispatcher: ';
         IF cst.dispatch_control.call_dispatcher THEN
           msg (22, *) := 'TRUE';
         ELSE
           msg (22, *) := 'FALSE';
         IFEND;
         syp$write_output_line (msg, status);
         msg := '    rethread_current_task: ';
         IF cst.dispatch_control.rethread_current_task THEN
           msg (28, *) := 'TRUE';
         ELSE
           msg (28, *) := 'FALSE';
         IFEND;
         syp$write_output_line (msg, status);
         msg := '    new_task_status: ';
         msg (22, *) := task_status_translations [cst.dispatch_control.new_task_status];
         syp$write_output_line (msg, status);
         msg := '    fill: ';
         IF cst.dispatch_control.fill THEN
           msg (11, *) := 'TRUE';
         ELSE
           msg (11, *) := 'FALSE';
         IFEND;
         syp$write_output_line (msg, status);
         msg := '    asynchronous_interrupts_pending: ';
         IF cst.dispatch_control.asynchronous_interrupts_pending THEN
           msg (38, *) := 'TRUE';
         ELSE
           msg (38, *) := 'FALSE';
         IFEND;
         syp$write_output_line (msg, status);

         msg := '  max cptime: ';
         syp$convert_bytes (#LOC (cst.max_cptime), #SIZE (cst.max_cptime), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  accumulated job cptime: ';
         syp$convert_bytes (#LOC (cst.accumulated_job_cptime), #SIZE (cst.accumulated_job_cptime), msg,
               add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  accumulated monitor cptime: ';
         syp$convert_bytes (#LOC (cst.accumulated_monitor_cptime), #SIZE(cst.accumulated_monitor_cptime),
               msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  ext int request: ';
         syp$write_output_line (msg, status);
         msg := '    task switch: ';
         IF cst.ext_int_request.task_switch THEN
           msg (18, *) := 'TRUE';
         ELSE
           msg (18, *) := 'FALSE';
         IFEND;
         syp$write_output_line (msg, status);
         msg := '    purge cache: ';
         IF cst.ext_int_request.purge_cache THEN
           msg (18, *) := 'TRUE';
         ELSE
           msg (18, *) := 'FALSE';
         IFEND;
         syp$write_output_line (msg, status);
         msg := '    purge map: ';
         IF cst.ext_int_request.purge_map THEN
           msg (16, *) := 'TRUE';
         ELSE
           msg (16, *) := 'FALSE';
         IFEND;
         syp$write_output_line (msg, status);
         msg := '    step processor: ';
         IF cst.ext_int_request.step_processor THEN
           msg (21, *) := 'TRUE';
         ELSE
           msg (21, *) := 'FALSE';
         IFEND;
         syp$write_output_line (msg, status);

         msg := '  time last cache purge: ';
         syp$convert_bytes (#LOC (cst.time_last_cache_purge), #SIZE (cst.time_last_cache_purge), msg,
               add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  time last cache purge: ';
         syp$convert_bytes (#LOC (cst.time_last_map_request), #SIZE (cst.time_last_map_request), msg,
               add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  monitor mps: ';
         syp$convert_bytes (#LOC (cst.monitor_mps), #SIZE (cst.monitor_mps), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  aborted task count: ';
         syp$convert_bytes (#LOC (cst.aborted_task_count), #SIZE (cst.aborted_task_count), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  due count: ';
         syp$convert_bytes (#LOC (cst.due_count), #SIZE (cst.due_count), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  element id: ';
         syp$convert_bytes (#LOC (cst.element_id), #SIZE (cst.element_id), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  ijl ordinal: ';
         syp$convert_bytes (#LOC (cst.ijl_ordinal), #SIZE (cst.ijl_ordinal), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  ijle_p: ';
         syp$convert_bytes (#LOC (cst.ijle_p), #SIZE (cst.ijle_p), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  cpu idle statistics: ';
         syp$write_output_line (msg, status);
         msg := '    idle, no io active: ';
         syp$convert_bytes (#LOC (cst.cpu_idle_statistics.idle_no_io_active),
               #SIZE (cst.cpu_idle_statistics.idle_no_io_active), msg, add_to_eol);
         syp$write_output_line (msg, status);
         msg := '    idle, io active: ';
         syp$convert_bytes (#LOC (cst.cpu_idle_statistics.idle_io_active),
               #SIZE (cst.cpu_idle_statistics.idle_io_active), msg, add_to_eol);
         syp$write_output_line (msg, status);
         msg := '   idle start time: ';
         syp$convert_bytes (#LOC (cst.cpu_idle_statistics.idle_start_time),
               #SIZE (cst.cpu_idle_statistics.idle_start_time), msg, add_to_eol);
         syp$write_output_line (msg, status);
         msg := '    idle type: ';
         IF cst.cpu_idle_statistics.idle_type = osc$not_idle THEN
           msg (16, *) := 'not idle';
         ELSEIF cst.cpu_idle_statistics.idle_type = osc$idle_with_io_active THEN
           msg (16, *) := 'idle with io active';
         ELSEIF cst.cpu_idle_statistics.idle_type = osc$idle_no_io_active THEN
           msg (16, *) := 'idle, no io active';
         ELSE
           syp$convert_bytes (#LOC (cst.cpu_idle_statistics.idle_type),
                 #SIZE (cst.cpu_idle_statistics.idle_type), msg, add_to_eol);
         IFEND;
         syp$write_output_line (msg, status);

         msg := '  trace control: ';
         syp$convert_bytes (#LOC (cst.trace_control), #SIZE (cst.trace_control), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  termination message: ';
         syp$convert_bytes (#LOC (cst.termination_message), #SIZE (cst.termination_message), msg, add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  reason for current state: ';
         IF cst.reason_for_current_state = osc$cdsr_null THEN
           msg (29, *) := '{null}';
         ELSEIF cst.reason_for_current_state = osc$cdsr_downed_by_dft THEN
           msg (29, *) := 'CPU downed by DFT';
         ELSEIF cst.reason_for_current_state = osc$cdsr_due_threshold_exceeded THEN
           msg (29, *) := 'DUE threshold exceeded';
         ELSEIF cst.reason_for_current_state = osc$cdsr_cpu_timeout THEN
           msg (29, *) := 'CPU timeout';
         ELSEIF cst.reason_for_current_state = osc$cdsr_downed_by_operator THEN
           msg (29, *) := 'CPU downed by operator';
         ELSEIF cst.reason_for_current_state = osc$cdsr_downed_by_system THEN
           msg (29, *) := 'CPU downed by system';
         ELSE
           syp$convert_bytes (#LOC (cst.reason_for_current_state), #SIZE (cst.reason_for_current_state), msg,
                 add_to_eol);
         IFEND;
         syp$write_output_line (msg, status);

         msg := '  pre-processed for reconfig: ';
         IF cst.pre_processed_for_reconfig = osc$ppfr_not_processed THEN
           msg (31, *) := 'not processed';
         ELSEIF cst.pre_processed_for_reconfig = osc$ppfr_processing_in_progress THEN
           msg (31, *) := 'processing in progress';
         ELSEIF cst.pre_processed_for_reconfig = osc$ppfr_processing_complete THEN
           msg (31, *) := 'processing complete';
         ELSE
           syp$convert_bytes (#LOC (cst.pre_processed_for_reconfig), #SIZE (cst.pre_processed_for_reconfig),
                 msg, add_to_eol);
         IFEND;
         syp$write_output_line (msg, status);

         msg := '  previous processor state: ';
         IF cst.previous_processor_state = cmc$on THEN
           msg (20, *) := 'ON';
         ELSEIF cst.previous_processor_state = cmc$down THEN
           msg (20, *) := 'DOWN';
         ELSEIF cst.previous_processor_state = cmc$off THEN
           msg (20, *) := 'OFF';
         ELSE
           syp$convert_bytes (#LOC (cst.previous_processor_state), #SIZE (cst.previous_processor_state), msg,
                 add_to_eol);
         IFEND;
         syp$write_output_line (msg, status);

         msg := '  log cpu state change: ';
         IF cst.log_cpu_state_change THEN
           msg (25, *) := 'TRUE';
         ELSE
           msg (25, *) := 'FALSE';
         IFEND;
         syp$write_output_line (msg, status);

         msg := '  next ptlo to dispatch: ';
         syp$convert_bytes (#LOC (cst.next_ptlo_to_dispatch), #SIZE (cst.next_ptlo_to_dispatch), msg,
               add_to_eol);
         syp$write_output_line (msg, status);

         msg := '  dispatching priority integer: ';
         syp$convert_bytes (#LOC (cst.dispatching_priority_integer), #SIZE (cst.dispatching_priority_integer),
                msg, add_to_eol);
         syp$write_output_line (msg, status);
      FOREND;
    IFEND;
  PROCEND syp$jobfileproc;
?? OLDTITLE, OLDTITLE ??
MODEND sym$debug1;
