?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE Physical Configuration Utility Subcommands processor.' ??
MODULE cmm$pcu_editor_commands;
?? RIGHT := 110 ??

{ PURPOSE:
{   This module contains the command processor interfaces for the Physical Configuration Editor commands.
{
{ NOTE:
{   When adding new parameters to any of the PCU subcommands or PCU editor commands, also add the P$XXXXXXX
{   constant to the constant declaration deck CMC$PCU_PARAMETER_INDICES.

?? NEWTITLE := 'Global Declarations Referenced by This Module.', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc clc$max_value_sets
*copyc cmc$pcu_parameter_indices
*copyc cme$logical_configuration_utl
*copyc cme$physical_configuration_utl
*copyc clt$parameter_value_table
*copyc cmt$element_definition
*copyc cmt$lcu_display_option_key
*copyc cmt$pcu_command_descriptor
*copyc ost$name
?? POP ??
*copyc clp$convert_integer_to_string
*copyc clp$convert_string_to_file
*copyc clp$count_list_elements
*copyc clp$close_display
*copyc clp$evaluate_parameters
*copyc clp$end_scan_command_file
*copyc clp$open_display
*copyc clp$reset_for_next_display_page
*copyc clp$put_partial_display
*copyc clp$push_utility
*copyc clp$pop_utility
*copyc clp$new_display_line
*copyc clp$build_standard_title
*copyc clp$put_job_output
*copyc clp$put_display
*copyc clp$get_command_origin
*copyc clp$scan_command_file
*copyc cmp$change_connection_ref_r3
*copyc cmp$change_definition
*copyc cmp$change_definition_name
*copyc cmp$check_reserved_names
*copyc cmp$clean_up_list
*copyc cmp$close_in_out_files
*copyc cmp$close_utility_files
*copyc cmp$crack_parameters
*copyc cmp$deadstart_phase
*copyc cmp$delete_all_elements
*copyc cmp$delete_definition
*copyc cmp$determine_element_type
*copyc cmp$display_elements_def
*copyc cmp$prompt_for_answer
*copyc cmp$search_edited_file
*copyc cmp$set_in_editor
*copyc cmp$set_exec_in_editor
*copyc cmp$open_utility_files
*copyc cmp$replace_definition
*copyc cmp$save_output
*copyc cmp$update_output_file
*copyc cmp$update_descriptor
*copyc fsp$open_file
*copyc fsp$close_file
*copyc osp$disestablish_cond_handler
*copyc osp$establish_block_exit_hndlr
*copyc osp$generate_error_message
*copyc osp$set_status_abnormal
*copyc osp$set_status_condition
*copyc osp$append_status_parameter
*copyc osp$append_status_integer
*copyc cmv$command_descriptor_p
*copyc cmv$reserved_names_list
*copyc osv$lower_to_upper
?? OLDTITLE ??
?? NEWTITLE := 'Global Declarations Declared by This Module.', EJECT ??

  TYPE
    t$access_type = (c$at_logically_on, c$at_logically_accessible, c$at_physical_accessible);

?? OLDTITLE ??
?? NEWTITLE := 'P$DISPLAY_MF_ELEMENTS', EJECT ??

{ PURPOSE:
{   This procedure displays all elements connected to a particular mainframe, iou or channel in the
{   physical configuration file processed by the PCU editor.

  PROCEDURE p$display_mf_elements
    (    element_option_value: cmt$element_name;
         display_option_array: ^array [ * ] of ost$name;
         channel: cmt$element_name;
         iou: cmt$element_name;
         mainframe: cmt$element_name;
         access_type: t$access_type;
     VAR display_control: clt$display_control;
     VAR status: ost$status);

    VAR
      byte_address: amt$file_byte_address,
      current_element_type: cmt$element_type,
      current_p: ^cmt$pcu_command_descriptor,
      display: boolean,
      element_type: cmt$element_type,
      first_time: boolean,
      found: boolean,
      found_element: cmt$pcu_command_descriptor,
      i: integer,
      j: integer,
      line: string (80),
      product_id: cmt$product_identification;

?? NEWTITLE := 'F$SELECTED_FOR_DISPLAY', EJECT ??

    FUNCTION [INLINE] f$selected_for_display
      (    found: boolean;
           access_type: t$access_type;
           state: ost$name): boolean;

      CASE access_type OF
      = c$at_logically_on =
        f$selected_for_display := found AND ((state = 'ON') OR (state = osc$null_name));
      = c$at_logically_accessible =
        f$selected_for_display := found AND ((state = 'ON') OR (state = 'DOWN') OR (state = osc$null_name));
      = c$at_physical_accessible =
        f$selected_for_display := found;
      ELSE
        f$selected_for_display := FALSE;
      CASEND;

    FUNCEND f$selected_for_display;
?? OLDTITLE ??
?? EJECT ??
    status.normal := TRUE;
    found := FALSE;
    line := '   ';
    first_time := TRUE;
    display := FALSE;

    IF cmv$command_descriptor_p = NIL THEN
      osp$set_status_condition (cme$pcu_empty_file, status);
      RETURN; {----->
    IFEND;

    current_p := cmv$command_descriptor_p;
    WHILE current_p <> NIL DO
      found := FALSE;
      CASE current_p^.connection OF
      = cmc$central_memory_connection = { Entry with IOU and/or Central Memory connections }
        IF current_p^.channel_list <> NIL THEN
          i := 1;
          WHILE (NOT found) AND (i <= UPPERBOUND (current_p^.channel_list^)) DO
            IF element_option_value = 'CHANNEL' THEN
              found := ((current_p^.channel_list^ [i].mainframe = mainframe) AND
                    (current_p^.channel_list^ [i].iou = iou) AND (current_p^.channel_list^ [i].channel =
                    channel));
            ELSEIF element_option_value = 'IOU' THEN
              found := ((current_p^.channel_list^ [i].mainframe = mainframe) AND
                    (current_p^.channel_list^ [i].iou = iou));
            ELSEIF element_option_value = 'MAINFRAME' THEN
              found := ((current_p^.channel_list^ [i].mainframe = mainframe));
            ELSE
              found := (current_p^.element_name = element_option_value);

            IFEND;

            found := f$selected_for_display (found, access_type, current_p^.state);
            i := i + 1;
          WHILEND;
        IFEND;

      = cmc$iou_connection =
        IF current_p^.iou_list <> NIL THEN
          i := 1;
          WHILE (NOT found) AND (i <= UPPERBOUND (current_p^.iou_list^)) DO
            IF element_option_value = 'CHANNEL' THEN
              found := ((current_p^.iou_list^ [i].mainframe = mainframe) AND
                    (current_p^.iou_list^ [i].iou = iou) AND (current_p^.iou_list^ [i].channel = channel));
            ELSEIF element_option_value = 'IOU' THEN
              found := ((current_p^.iou_list^ [i].mainframe = mainframe) AND
                    (current_p^.iou_list^ [i].iou = iou));
            ELSEIF element_option_value = 'MAINFRAME' THEN
              found := ((current_p^.iou_list^ [i].mainframe = mainframe));
            ELSE
              found := (current_p^.element_name = element_option_value);

            IFEND;

            found := f$selected_for_display (found, access_type, current_p^.state);
            i := i + 1;
          WHILEND;
        IFEND;

      = cmc$peripheral_connection =
        IF current_p^.pc_list <> NIL THEN
          i := 1;
          found := FALSE;

{ Element option value is not a mainframe name
          IF (element_option_value <> 'CHANNEL') AND (element_option_value <> 'IOU') AND
                (element_option_value <> 'MAINFRAME') THEN

            WHILE NOT found AND (i <= UPPERBOUND (current_p^.pc_list^)) DO
              found := (current_p^.pc_list^ [i].peripheral = element_option_value);
              IF NOT found THEN

{ element name sought is not in the connection
                IF (current_p^.element_name = element_option_value) THEN
                  cmp$search_edited_file (current_p^.pc_list^ [i].peripheral, 0, product_id, found,
                        found_element);
                  found := f$selected_for_display (found, access_type, found_element.state);
                  IF found THEN
                    display := TRUE;
                    p$display_name (found_element, display_option_array, display_control, status);
                    IF NOT status.normal THEN
                      RETURN; {----->
                    IFEND;
                    found := FALSE; { So we don't display the name }
                  IFEND;
                IFEND;
              IFEND;
              i := i + 1;

              found := f$selected_for_display (found, access_type, current_p^.state);
            WHILEND;

          ELSE
            i := 1;
            WHILE (NOT found) AND (i <= UPPERBOUND (current_p^.pc_list^)) DO
              cmp$search_edited_file (current_p^.pc_list^ [i].peripheral, 0, product_id, found,
                    found_element);
              CASE found_element.connection OF
              = cmc$iou_connection =
                IF found_element.iou_list <> NIL THEN
                  j := 1;
                  found := FALSE;
                  WHILE (NOT found) AND (j <= UPPERBOUND (found_element.iou_list^)) DO
                    CASE found_element.connection OF
                    = cmc$iou_connection =
                      IF element_option_value = 'CHANNEL' THEN
                        found := ((found_element.iou_list^ [j].mainframe = mainframe) AND
                              (found_element.iou_list^ [j].iou = iou) AND
                              (found_element.iou_list^ [j].channel = channel));
                      ELSEIF element_option_value = 'IOU' THEN
                        found := ((found_element.iou_list^ [j].mainframe = mainframe) AND
                              (found_element.iou_list^ [j].iou = iou));
                      ELSEIF element_option_value = 'MAINFRAME' THEN
                        found := ((found_element.iou_list^ [j].mainframe = mainframe));
                      ELSE
                        found := (found_element.element_name = element_option_value);
                      IFEND;
                    ELSE
                      ;
                    CASEND;
                    found := f$selected_for_display (found, access_type, found_element.state);
                    j := j + 1;
                  WHILEND;
                IFEND;
              ELSE
                ;
              CASEND;

              i := i + 1;
            WHILEND;

          IFEND;
        IFEND;
      ELSE
        ;
      CASEND;

      IF found THEN
        display := TRUE;
        p$display_name (current_p^, display_option_array, display_control, status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
      IFEND;

      current_p := current_p^.next_descriptor;
    WHILEND;

    IF NOT display THEN
      line (1, 15) := 'Connections to';
      IF element_option_value = 'CHANNEL' THEN
        line (17, 5) := iou;
        line (24, * ) := channel;
      ELSEIF element_option_value = 'IOU' THEN
        line (17, * ) := iou;
      ELSEIF element_option_value = 'MAINFRAME' THEN
        line (17, * ) := mainframe;
      ELSE
        line (17, * ) := element_option_value;
      IFEND;
      osp$set_status_abnormal (cmc$configuration_management_id, cme$pcu_element_not_found, line, status);
    IFEND;

  PROCEND p$display_mf_elements;
?? OLDTITLE ??
?? NEWTITLE := 'P$DISPLAY_NAME', EJECT ??

{ PURPOSE:
{   This procedure display the command descriptor in the edited physical configuration file.

  PROCEDURE p$display_name
    (    current_p: cmt$pcu_command_descriptor;
         display_option_array: ^array [ * ] of ost$name;
     VAR display_control: clt$display_control;
     VAR status: ost$status);

    VAR
      byte_address: amt$file_byte_address,
      connection_line: string (80),
      display_all: boolean,
      i: integer,
      j: integer,
      line: string (80),
      pos: integer,
      str: ost$string;

    status.normal := TRUE;
    display_all := FALSE;
    line := '  ';
    pos := 2;

  /search_option/
    FOR i := 1 TO UPPERBOUND (display_option_array^) DO
      IF (display_option_array^ [i] = 'ALL') THEN
        display_all := TRUE;
        EXIT /search_option/; {----->
      IFEND;
    FOREND /search_option/;

    IF NOT display_all THEN
      FOR i := 1 TO UPPERBOUND (display_option_array^) DO
        IF display_option_array^ [i] = 'NAME' THEN
          line (pos, 31) := current_p.element_name;
          pos := pos + 32;

        ELSEIF display_option_array^ [i] = 'ELEMENT_IDENTIFICATION' THEN
          line (pos, 10) := current_p.pid;
          pos := pos + 11;

        ELSEIF display_option_array^ [i] = 'STATE' THEN
          line (pos, 4) := current_p.state;
          pos := pos + 5;

        ELSEIF display_option_array^ [i] = 'SERIAL_NUMBER' THEN
          clp$convert_integer_to_string (current_p.sn, 10, FALSE, str, status);
          IF NOT status.normal THEN
            RETURN; {----->
          IFEND;
          line (pos, 6) := str.value;
          pos := pos + 7;

        ELSEIF display_option_array^ [i] = 'IOU_PROGRAM_NAME' THEN
          line (pos, 7) := current_p.ioupn;
          pos := pos + 8;

        ELSEIF display_option_array^ [i] = 'VERIFY_ELEMENT_IDENTIFICATION' THEN
          IF current_p.verify THEN
            line (pos, 5) := 'TRUE ';
          ELSE
            line (pos, 5) := 'FALSE';
          IFEND;
          pos := pos + 6;
        IFEND;
      FOREND;

      clp$put_partial_display (display_control, line, clc$trim, amc$terminate, status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;
    ELSE

      line (pos, 31) := current_p.element_name;
      pos := pos + 32;
      line (pos, 10) := current_p.pid;
      pos := pos + 11;
      line (pos, 4) := current_p.state;
      pos := pos + 5;
      clp$convert_integer_to_string (current_p.sn, 10, FALSE, str, status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;
      line (pos, 6) := str.value;
      pos := pos + 7;
      line (pos, 7) := current_p.ioupn;
      pos := pos + 8;
      IF current_p.verify THEN
        line (pos, 5) := 'TRUE ';
      ELSE
        line (pos, 5) := 'FALSE';
        pos := pos + 6;
      IFEND;

      clp$put_partial_display (display_control, line, clc$trim, amc$terminate, status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;
    IFEND;

  PROCEND p$display_name;
?? OLDTITLE ??
?? NEWTITLE := 'CMP$ADD_ELEMENT_DEF ', EJECT ??

{ PURPOSE :
{   This procedure is the command processor for the PCU editor command ADD_ELEMENT_DEFINITION.

  PROCEDURE [XDCL] cmp$add_element_def
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (cmm$edipc_added) add_element_definition, added (
{   element, e: name = $required
{   same_as, sa: name = $optional
{   element_identification, ei: any of
{       key
{         $834_12, $836_xxx, $844_4x, $885_1x, $887_1, $895_2, $9836_1, $9853_x, $5832_1, $5832_2, $5833_1
{         $5833_1p, $5833_2, $5833_3p, $5833_4, $5837_1, $5837_1p, $5837_2, $5837_3p, $5837_4, $5838_1, $583..
{ 8_1p
{         $5838_2, $5838_3p, $5838_4, $47444_1, $47444_1p, $47444_2, $47444_3p, $47444_4, $ntdd_1, $ntdd_2
{         $ntdd_3, $ntdd_4, $ntdd_5, $ntdd_6, $7155_1, $7155_1x, $7165_2x, $10395_11, $fa7b4_d, $fa7b5_a
{         $5831_x, $ntdc_1, $ntdc_2, $5680_11, $5682_1x, $5698_1x, $639_1, $679_x, $698_1x, $698_2x, $698_3x
{         $7021_3x, $7221_1, $7221_11, $9639_1, $65354_1x, $4000_xx, $2620_xxx, $2621_xxx, $2629_x, $380_170
{         $5380_100, $7040_200
{       keyend
{       name 1..10
{     anyend = $optional
{   iou_program_name, ioupn, ipn: name = $optional
{   serial_number, sn: integer 1..999999 = $optional
{   state, s: key
{       down, off, on
{     keyend = on
{   central_memory_connection, central_memory_connections, cmc: list 1..CLC$MAX_VALUE_SETS of record
{       port: integer 0..3
{       mainframe: name = $optional
{     recend = $optional
{   iou_connection, iou_connections, ic: list 1..CLC$MAX_VALUE_SETS of record
{       channel: name
{       equipment: integer 0..7 = $optional
{       mainframe: name = $optional
{       iou: name = $optional
{     recend = $optional
{   peripheral_connection, peripheral_connections, pc: list 1..CLC$MAX_VALUE_SETS of record
{       peripheral_element: name
{       physical_address: integer 0..0ffff(16) = $optional
{     recend = $optional
{   verify_element_identification, vei: boolean = true
{   application_information, ai: string = $optional
{   site_information, si: string = $optional
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 29] of clt$pdt_parameter_name,
      parameters: array [1 .. 13] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 65] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type5: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
      type6: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 3] of clt$keyword_specification,
        default_value: string (2),
      recend,
      type7: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$integer_type_qualifier,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
      recend,
      type8: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$integer_type_qualifier,
          recend,
          field_spec_3: clt$field_specification,
          element_type_spec_3: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
          field_spec_4: clt$field_specification,
          element_type_spec_4: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
      recend,
      type9: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$integer_type_qualifier,
          recend,
        recend,
      recend,
      type10: record
        header: clt$type_specification_header,
        default_value: string (4),
      recend,
      type11: record
        header: clt$type_specification_header,
        qualifier: clt$string_type_qualifier,
      recend,
      type12: record
        header: clt$type_specification_header,
        qualifier: clt$string_type_qualifier,
      recend,
      type13: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [103, 8, 12, 17, 12, 4, 93],
    clc$command, 29, 13, 1, 0, 0, 0, 13, 'CMM$EDIPC_ADDED'], [
    ['AI                             ',clc$abbreviation_entry, 11],
    ['APPLICATION_INFORMATION        ',clc$nominal_entry, 11],
    ['CENTRAL_MEMORY_CONNECTION      ',clc$nominal_entry, 7],
    ['CENTRAL_MEMORY_CONNECTIONS     ',clc$alias_entry, 7],
    ['CMC                            ',clc$abbreviation_entry, 7],
    ['E                              ',clc$abbreviation_entry, 1],
    ['EI                             ',clc$abbreviation_entry, 3],
    ['ELEMENT                        ',clc$nominal_entry, 1],
    ['ELEMENT_IDENTIFICATION         ',clc$nominal_entry, 3],
    ['IC                             ',clc$abbreviation_entry, 8],
    ['IOUPN                          ',clc$alias_entry, 4],
    ['IOU_CONNECTION                 ',clc$nominal_entry, 8],
    ['IOU_CONNECTIONS                ',clc$alias_entry, 8],
    ['IOU_PROGRAM_NAME               ',clc$nominal_entry, 4],
    ['IPN                            ',clc$abbreviation_entry, 4],
    ['PC                             ',clc$abbreviation_entry, 9],
    ['PERIPHERAL_CONNECTION          ',clc$nominal_entry, 9],
    ['PERIPHERAL_CONNECTIONS         ',clc$alias_entry, 9],
    ['S                              ',clc$abbreviation_entry, 6],
    ['SA                             ',clc$abbreviation_entry, 2],
    ['SAME_AS                        ',clc$nominal_entry, 2],
    ['SERIAL_NUMBER                  ',clc$nominal_entry, 5],
    ['SI                             ',clc$abbreviation_entry, 12],
    ['SITE_INFORMATION               ',clc$nominal_entry, 12],
    ['SN                             ',clc$abbreviation_entry, 5],
    ['STATE                          ',clc$nominal_entry, 6],
    ['STATUS                         ',clc$nominal_entry, 13],
    ['VEI                            ',clc$abbreviation_entry, 10],
    ['VERIFY_ELEMENT_IDENTIFICATION  ',clc$nominal_entry, 10]],
    [
{ PARAMETER 1
    [8, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [21, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$optional_parameter, 0
  , 0],
{ PARAMETER 3
    [9, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 2437,
  clc$optional_parameter, 0, 0],
{ PARAMETER 4
    [14, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$optional_parameter, 0
  , 0],
{ PARAMETER 5
    [22, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 20, clc$optional_parameter,
  0, 0],
{ PARAMETER 6
    [26, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 118,
  clc$optional_default_parameter, 0, 2],
{ PARAMETER 7
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 120,
  clc$optional_parameter, 0, 0],
{ PARAMETER 8
    [12, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 202,
  clc$optional_parameter, 0, 0],
{ PARAMETER 9
    [17, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 120,
  clc$optional_parameter, 0, 0],
{ PARAMETER 10
    [29, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_default_parameter, 0, 4],
{ PARAMETER 11
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$optional_parameter, 0
  , 0],
{ PARAMETER 12
    [24, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$optional_parameter, 0
  , 0],
{ PARAMETER 13
    [27, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 2
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 3
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
    FALSE, 2],
    2412, [[1, 0, clc$keyword_type], [65], [
      ['$10395_11                      ', clc$nominal_entry, clc$normal_usage_entry, 40],
      ['$2620_XXX                      ', clc$nominal_entry, clc$normal_usage_entry, 60],
      ['$2621_XXX                      ', clc$nominal_entry, clc$normal_usage_entry, 61],
      ['$2629_X                        ', clc$nominal_entry, clc$normal_usage_entry, 62],
      ['$380_170                       ', clc$nominal_entry, clc$normal_usage_entry, 63],
      ['$4000_XX                       ', clc$nominal_entry, clc$normal_usage_entry, 59],
      ['$47444_1                       ', clc$nominal_entry, clc$normal_usage_entry, 26],
      ['$47444_1P                      ', clc$nominal_entry, clc$normal_usage_entry, 27],
      ['$47444_2                       ', clc$nominal_entry, clc$normal_usage_entry, 28],
      ['$47444_3P                      ', clc$nominal_entry, clc$normal_usage_entry, 29],
      ['$47444_4                       ', clc$nominal_entry, clc$normal_usage_entry, 30],
      ['$5380_100                      ', clc$nominal_entry, clc$normal_usage_entry, 64],
      ['$5680_11                       ', clc$nominal_entry, clc$normal_usage_entry, 46],
      ['$5682_1X                       ', clc$nominal_entry, clc$normal_usage_entry, 47],
      ['$5698_1X                       ', clc$nominal_entry, clc$normal_usage_entry, 48],
      ['$5831_X                        ', clc$nominal_entry, clc$normal_usage_entry, 43],
      ['$5832_1                        ', clc$nominal_entry, clc$normal_usage_entry, 9],
      ['$5832_2                        ', clc$nominal_entry, clc$normal_usage_entry, 10],
      ['$5833_1                        ', clc$nominal_entry, clc$normal_usage_entry, 11],
      ['$5833_1P                       ', clc$nominal_entry, clc$normal_usage_entry, 12],
      ['$5833_2                        ', clc$nominal_entry, clc$normal_usage_entry, 13],
      ['$5833_3P                       ', clc$nominal_entry, clc$normal_usage_entry, 14],
      ['$5833_4                        ', clc$nominal_entry, clc$normal_usage_entry, 15],
      ['$5837_1                        ', clc$nominal_entry, clc$normal_usage_entry, 16],
      ['$5837_1P                       ', clc$nominal_entry, clc$normal_usage_entry, 17],
      ['$5837_2                        ', clc$nominal_entry, clc$normal_usage_entry, 18],
      ['$5837_3P                       ', clc$nominal_entry, clc$normal_usage_entry, 19],
      ['$5837_4                        ', clc$nominal_entry, clc$normal_usage_entry, 20],
      ['$5838_1                        ', clc$nominal_entry, clc$normal_usage_entry, 21],
      ['$5838_1P                       ', clc$nominal_entry, clc$normal_usage_entry, 22],
      ['$5838_2                        ', clc$nominal_entry, clc$normal_usage_entry, 23],
      ['$5838_3P                       ', clc$nominal_entry, clc$normal_usage_entry, 24],
      ['$5838_4                        ', clc$nominal_entry, clc$normal_usage_entry, 25],
      ['$639_1                         ', clc$nominal_entry, clc$normal_usage_entry, 49],
      ['$65354_1X                      ', clc$nominal_entry, clc$normal_usage_entry, 58],
      ['$679_X                         ', clc$nominal_entry, clc$normal_usage_entry, 50],
      ['$698_1X                        ', clc$nominal_entry, clc$normal_usage_entry, 51],
      ['$698_2X                        ', clc$nominal_entry, clc$normal_usage_entry, 52],
      ['$698_3X                        ', clc$nominal_entry, clc$normal_usage_entry, 53],
      ['$7021_3X                       ', clc$nominal_entry, clc$normal_usage_entry, 54],
      ['$7040_200                      ', clc$nominal_entry, clc$normal_usage_entry, 65],
      ['$7155_1                        ', clc$nominal_entry, clc$normal_usage_entry, 37],
      ['$7155_1X                       ', clc$nominal_entry, clc$normal_usage_entry, 38],
      ['$7165_2X                       ', clc$nominal_entry, clc$normal_usage_entry, 39],
      ['$7221_1                        ', clc$nominal_entry, clc$normal_usage_entry, 55],
      ['$7221_11                       ', clc$nominal_entry, clc$normal_usage_entry, 56],
      ['$834_12                        ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['$836_XXX                       ', clc$nominal_entry, clc$normal_usage_entry, 2],
      ['$844_4X                        ', clc$nominal_entry, clc$normal_usage_entry, 3],
      ['$885_1X                        ', clc$nominal_entry, clc$normal_usage_entry, 4],
      ['$887_1                         ', clc$nominal_entry, clc$normal_usage_entry, 5],
      ['$895_2                         ', clc$nominal_entry, clc$normal_usage_entry, 6],
      ['$9639_1                        ', clc$nominal_entry, clc$normal_usage_entry, 57],
      ['$9836_1                        ', clc$nominal_entry, clc$normal_usage_entry, 7],
      ['$9853_X                        ', clc$nominal_entry, clc$normal_usage_entry, 8],
      ['$FA7B4_D                       ', clc$nominal_entry, clc$normal_usage_entry, 41],
      ['$FA7B5_A                       ', clc$nominal_entry, clc$normal_usage_entry, 42],
      ['$NTDC_1                        ', clc$nominal_entry, clc$normal_usage_entry, 44],
      ['$NTDC_2                        ', clc$nominal_entry, clc$normal_usage_entry, 45],
      ['$NTDD_1                        ', clc$nominal_entry, clc$normal_usage_entry, 31],
      ['$NTDD_2                        ', clc$nominal_entry, clc$normal_usage_entry, 32],
      ['$NTDD_3                        ', clc$nominal_entry, clc$normal_usage_entry, 33],
      ['$NTDD_4                        ', clc$nominal_entry, clc$normal_usage_entry, 34],
      ['$NTDD_5                        ', clc$nominal_entry, clc$normal_usage_entry, 35],
      ['$NTDD_6                        ', clc$nominal_entry, clc$normal_usage_entry, 36]]
      ],
    5, [[1, 0, clc$name_type], [1, 10]]
    ],
{ PARAMETER 4
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 5
    [[1, 0, clc$integer_type], [1, 999999, 10]],
{ PARAMETER 6
    [[1, 0, clc$keyword_type], [3], [
    ['DOWN                           ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['OFF                            ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['ON                             ', clc$nominal_entry, clc$normal_usage_entry, 3]]
    ,
    'on'],
{ PARAMETER 7
    [[1, 0, clc$list_type], [104, 1, CLC$MAX_VALUE_SETS, 0, FALSE, FALSE],
      [[1, 0, clc$record_type], [2],
      ['PORT                           ', clc$required_field, 20], [[1, 0, clc$integer_type], [0, 3, 10]],
      ['MAINFRAME                      ', clc$optional_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]]
      ]
    ],
{ PARAMETER 8
    [[1, 0, clc$list_type], [186, 1, CLC$MAX_VALUE_SETS, 0, FALSE, FALSE],
      [[1, 0, clc$record_type], [4],
      ['CHANNEL                        ', clc$required_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]],
      ['EQUIPMENT                      ', clc$optional_field, 20], [[1, 0, clc$integer_type], [0, 7, 10]],
      ['MAINFRAME                      ', clc$optional_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]],
      ['IOU                            ', clc$optional_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]]
      ]
    ],
{ PARAMETER 9
    [[1, 0, clc$list_type], [104, 1, CLC$MAX_VALUE_SETS, 0, FALSE, FALSE],
      [[1, 0, clc$record_type], [2],
      ['PERIPHERAL_ELEMENT             ', clc$required_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]],
      ['PHYSICAL_ADDRESS               ', clc$optional_field, 20], [[1, 0, clc$integer_type], [0, 0ffff(16),
  10]]
      ]
    ],
{ PARAMETER 10
    [[1, 0, clc$boolean_type],
    'true'],
{ PARAMETER 11
    [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]],
{ PARAMETER 12
    [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]],
{ PARAMETER 13
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$element = 1,
      p$same_as = 2,
      p$element_identification = 3,
      p$iou_program_name = 4,
      p$serial_number = 5,
      p$state = 6,
      p$central_memory_connection = 7,
      p$iou_connection = 8,
      p$peripheral_connection = 9,
      p$verify_element_identification = 10,
      p$application_information = 11,
      p$site_information = 12,
      p$status = 13;

    VAR
      pvt: array [1 .. 13] of clt$parameter_value;

    CONST
      command_name = 'ADD_ELEMENT_DEFINITION';

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    cmp$crack_parameters (^pvt, command_name, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

  PROCEND cmp$add_element_def;
?? OLDTITLE ??
?? NEWTITLE := 'CMP$CHANGE_CONNECT_REFERENCE', EJECT ??

{ PURPOSE :
{   This procedure is the command processor for the PCU editor command CHANGE_CONNECTION_REFERENCE.

  PROCEDURE [XDCL] cmp$change_connect_reference
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (cmm$edipc_chacr) change_connection_reference, chacr (
{   old_channel_name, ocn: record
{       channel: name
{       mainframe: name = $optional
{       iou: name = $optional
{     recend = $optional
{   new_channel_name, ncn: record
{       channel: name
{       mainframe: name = $optional
{       iou: name = $optional
{     recend = $optional
{   old_mainframe_name, omn: record
{       mainframe: name
{       iou: name = $optional
{     recend = $optional
{   new_mainframe_name, nmn: record
{       mainframe: name
{       iou: name = $optional
{     recend = $optional
{   old_peripheral_name, opn: name = $optional
{   new_peripheral_name, npn: name = $optional
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 13] of clt$pdt_parameter_name,
      parameters: array [1 .. 7] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$record_type_qualifier,
        field_spec_1: clt$field_specification,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        field_spec_2: clt$field_specification,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        field_spec_3: clt$field_specification,
        element_type_spec_3: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$record_type_qualifier,
        field_spec_1: clt$field_specification,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        field_spec_2: clt$field_specification,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        field_spec_3: clt$field_specification,
        element_type_spec_3: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$record_type_qualifier,
        field_spec_1: clt$field_specification,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        field_spec_2: clt$field_specification,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$record_type_qualifier,
        field_spec_1: clt$field_specification,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        field_spec_2: clt$field_specification,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
      recend,
      type5: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type6: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type7: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [88, 11, 10, 13, 13, 49, 615],
    clc$command, 13, 7, 0, 0, 0, 0, 7, 'CMM$EDIPC_CHACR'], [
    ['NCN                            ',clc$abbreviation_entry, 2],
    ['NEW_CHANNEL_NAME               ',clc$nominal_entry, 2],
    ['NEW_MAINFRAME_NAME             ',clc$nominal_entry, 4],
    ['NEW_PERIPHERAL_NAME            ',clc$nominal_entry, 6],
    ['NMN                            ',clc$abbreviation_entry, 4],
    ['NPN                            ',clc$abbreviation_entry, 6],
    ['OCN                            ',clc$abbreviation_entry, 1],
    ['OLD_CHANNEL_NAME               ',clc$nominal_entry, 1],
    ['OLD_MAINFRAME_NAME             ',clc$nominal_entry, 3],
    ['OLD_PERIPHERAL_NAME            ',clc$nominal_entry, 5],
    ['OMN                            ',clc$abbreviation_entry, 3],
    ['OPN                            ',clc$abbreviation_entry, 5],
    ['STATUS                         ',clc$nominal_entry, 7]],
    [
{ PARAMETER 1
    [8, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 130,
  clc$optional_parameter, 0, 0],
{ PARAMETER 2
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 130,
  clc$optional_parameter, 0, 0],
{ PARAMETER 3
    [9, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 89, clc$optional_parameter,
  0, 0],
{ PARAMETER 4
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 89, clc$optional_parameter,
  0, 0],
{ PARAMETER 5
    [10, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$optional_parameter, 0
  , 0],
{ PARAMETER 6
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$optional_parameter, 0
  , 0],
{ PARAMETER 7
    [13, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$record_type], [3],
    ['CHANNEL                        ', clc$required_field, 5], [[1, 0, clc$name_type], [1, osc$max_name_size]
  ],
    ['MAINFRAME                      ', clc$optional_field, 5], [[1, 0, clc$name_type], [1, osc$max_name_size]
  ],
    ['IOU                            ', clc$optional_field, 5], [[1, 0, clc$name_type], [1, osc$max_name_size]
  ]
    ],
{ PARAMETER 2
    [[1, 0, clc$record_type], [3],
    ['CHANNEL                        ', clc$required_field, 5], [[1, 0, clc$name_type], [1, osc$max_name_size]
  ],
    ['MAINFRAME                      ', clc$optional_field, 5], [[1, 0, clc$name_type], [1, osc$max_name_size]
  ],
    ['IOU                            ', clc$optional_field, 5], [[1, 0, clc$name_type], [1, osc$max_name_size]
  ]
    ],
{ PARAMETER 3
    [[1, 0, clc$record_type], [2],
    ['MAINFRAME                      ', clc$required_field, 5], [[1, 0, clc$name_type], [1, osc$max_name_size]
  ],
    ['IOU                            ', clc$optional_field, 5], [[1, 0, clc$name_type], [1, osc$max_name_size]
  ]
    ],
{ PARAMETER 4
    [[1, 0, clc$record_type], [2],
    ['MAINFRAME                      ', clc$required_field, 5], [[1, 0, clc$name_type], [1, osc$max_name_size]
  ],
    ['IOU                            ', clc$optional_field, 5], [[1, 0, clc$name_type], [1, osc$max_name_size]
  ]
    ],
{ PARAMETER 5
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 6
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 7
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$old_channel_name = 1,
      p$new_channel_name = 2,
      p$old_mainframe_name = 3,
      p$new_mainframe_name = 4,
      p$old_peripheral_name = 5,
      p$new_peripheral_name = 6,
      p$status = 7;

    VAR
      pvt: array [1 .. 7] of clt$parameter_value;

    VAR
      new_channel_list: ^clt$data_value,
      new_mainframe_list: ^clt$data_value,
      new_peripheral: cmt$element_name,
      old_channel_list: ^clt$data_value,
      old_mainframe_list: ^clt$data_value,
      old_peripheral: cmt$element_name;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    IF pvt [p$old_channel_name].specified AND (NOT pvt [p$new_channel_name].specified) THEN
      osp$set_status_abnormal (cmc$configuration_management_id, cme$pcu_missing_parameters,
            'NEW_CHANNEL_NAME', status);
      RETURN; {----->
    ELSEIF (NOT pvt [p$old_channel_name].specified) AND pvt [p$new_channel_name].specified THEN
      osp$set_status_abnormal (cmc$configuration_management_id, cme$pcu_missing_parameters,
            'OLD_CHANNEL_NAME', status);
      RETURN; {----->
    ELSEIF pvt [p$old_mainframe_name].specified AND (NOT pvt [p$new_mainframe_name].specified) THEN
      osp$set_status_abnormal (cmc$configuration_management_id, cme$pcu_missing_parameters,
            'NEW_MAINFRAME_NAME', status);
      RETURN; {----->
    ELSEIF (NOT pvt [p$old_mainframe_name].specified) AND pvt [p$new_mainframe_name].specified THEN
      osp$set_status_abnormal (cmc$configuration_management_id, cme$pcu_missing_parameters,
            'OLD_MAINFRAME_NAME', status);
      RETURN; {----->
    ELSEIF pvt [p$old_peripheral_name].specified AND (NOT pvt [p$new_peripheral_name].specified) THEN
      osp$set_status_abnormal (cmc$configuration_management_id, cme$pcu_missing_parameters,
            'NEW_PERIPHERAL_NAME', status);
      RETURN; {----->
    ELSEIF (NOT pvt [p$old_peripheral_name].specified) AND pvt [p$new_peripheral_name].specified THEN
      osp$set_status_abnormal (cmc$configuration_management_id, cme$pcu_missing_parameters,
            'OLD_PERIPHERAL_NAME', status);
      RETURN; {----->
    IFEND;

    new_channel_list := NIL;
    new_mainframe_list := NIL;
    old_channel_list := NIL;
    old_mainframe_list := NIL;
    new_peripheral := osc$null_name;
    old_peripheral := osc$null_name;

    IF (pvt [p$old_channel_name].specified AND pvt [p$new_channel_name].specified) THEN
      old_channel_list := pvt [p$old_channel_name].value;
      new_channel_list := pvt [p$new_channel_name].value;
    IFEND;

    IF (pvt [p$old_mainframe_name].specified AND pvt [p$new_mainframe_name].specified) THEN
      old_mainframe_list := pvt [p$old_mainframe_name].value;
      new_mainframe_list := pvt [p$new_mainframe_name].value;
    IFEND;

    IF (pvt [p$old_peripheral_name].specified AND pvt [p$new_peripheral_name].specified) THEN
      old_peripheral := pvt [p$old_peripheral_name].value^.name_value;
      new_peripheral := pvt [p$new_peripheral_name].value^.name_value;
    IFEND;

    cmp$change_connection_ref_r3 (old_channel_list, new_channel_list, old_mainframe_list, new_mainframe_list,
          old_peripheral, new_peripheral, status);

  PROCEND cmp$change_connect_reference;
?? OLDTITLE ??
?? NEWTITLE := 'CMP$CHANGE_ELEMENT_DEF', EJECT ??

{ PURPOSE :
{   This procedure is the command processor for the PCU editor command CHANGE_ELEMENT_DEFINITION.

  PROCEDURE [XDCL] cmp$change_element_def
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (cmm$edipc_chaed) change_element_definition, chaed (
{   element, e: name = $required
{   same_as, sa: name = $optional
{   element_identification, ei: any of
{       key
{         $834_12, $836_xxx, $844_4x, $885_1x, $887_1, $895_2, $9836_1, $9853_x, $5832_1, $5832_2, $5833_1
{         $5833_1p, $5833_2, $5833_3p, $5833_4, $5837_1, $5837_1p, $5837_2, $5837_3p, $5837_4, $5838_1, $583..
{ 8_1p
{         $5838_2, $5838_3p, $5838_4, $47444_1, $47444_1p, $47444_2, $47444_3p, $47444_4, $ntdd_1, $ntdd_2
{         $ntdd_3, $ntdd_4, $ntdd_5, $ntdd_6, $7155_1, $7155_1x, $7165_2x, $10395_11, $fa7b4_d, $fa7b5_a
{         $5831_x, $ntdc_1, $ntdc_2, $5680_11, $5682_1x, $5698_1x, $639_1, $679_x, $698_1x, $698_2x, $698_3x
{         $7021_3x, $7221_1, $7221_11, $9639_1, $65354_1x, $4000_xx, $2620_xxx, $2621_xxx, $2629_x, $380_170
{         $5380_100, $7040_200
{       keyend
{       name 1..10
{     anyend = $optional
{   iou_program_name, ioupn, ipn: any of
{       key
{         none
{       keyend
{       name
{     anyend = $optional
{   serial_number, sn: integer 1..999999 = $optional
{   state, s: key
{       down, off, on
{     keyend = $optional
{   central_memory_connection, central_memory_connections, cmc: list 1..CLC$MAX_VALUE_SETS of record
{       port: integer 0..3
{       mainframe: name = $optional
{     recend = $optional
{   iou_connection, iou_connections, ic: list 1..CLC$MAX_VALUE_SETS of record
{       channel: name
{       equipment: integer 0..7 = $optional
{       mainframe: name = $optional
{       iou: name = $optional
{     recend = $optional
{   peripheral_connection, peripheral_connections, pc: list 1..CLC$MAX_VALUE_SETS of record
{       peripheral_element: name
{       physical_address: integer 0..0ffff(16) = $optional
{     recend = $optional
{   verify_element_identification, vei: boolean = $optional
{   application_information, ai: string = $optional
{   site_information, si: string = $optional
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 29] of clt$pdt_parameter_name,
      parameters: array [1 .. 13] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 65] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
      recend,
      type5: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
      type6: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 3] of clt$keyword_specification,
      recend,
      type7: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$integer_type_qualifier,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
      recend,
      type8: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$integer_type_qualifier,
          recend,
          field_spec_3: clt$field_specification,
          element_type_spec_3: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
          field_spec_4: clt$field_specification,
          element_type_spec_4: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
      recend,
      type9: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$integer_type_qualifier,
          recend,
        recend,
      recend,
      type10: record
        header: clt$type_specification_header,
      recend,
      type11: record
        header: clt$type_specification_header,
        qualifier: clt$string_type_qualifier,
      recend,
      type12: record
        header: clt$type_specification_header,
        qualifier: clt$string_type_qualifier,
      recend,
      type13: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [103, 8, 14, 12, 44, 13, 42],
    clc$command, 29, 13, 1, 0, 0, 0, 13, 'CMM$EDIPC_CHAED'], [
    ['AI                             ',clc$abbreviation_entry, 11],
    ['APPLICATION_INFORMATION        ',clc$nominal_entry, 11],
    ['CENTRAL_MEMORY_CONNECTION      ',clc$nominal_entry, 7],
    ['CENTRAL_MEMORY_CONNECTIONS     ',clc$alias_entry, 7],
    ['CMC                            ',clc$abbreviation_entry, 7],
    ['E                              ',clc$abbreviation_entry, 1],
    ['EI                             ',clc$abbreviation_entry, 3],
    ['ELEMENT                        ',clc$nominal_entry, 1],
    ['ELEMENT_IDENTIFICATION         ',clc$nominal_entry, 3],
    ['IC                             ',clc$abbreviation_entry, 8],
    ['IOUPN                          ',clc$alias_entry, 4],
    ['IOU_CONNECTION                 ',clc$nominal_entry, 8],
    ['IOU_CONNECTIONS                ',clc$alias_entry, 8],
    ['IOU_PROGRAM_NAME               ',clc$nominal_entry, 4],
    ['IPN                            ',clc$abbreviation_entry, 4],
    ['PC                             ',clc$abbreviation_entry, 9],
    ['PERIPHERAL_CONNECTION          ',clc$nominal_entry, 9],
    ['PERIPHERAL_CONNECTIONS         ',clc$alias_entry, 9],
    ['S                              ',clc$abbreviation_entry, 6],
    ['SA                             ',clc$abbreviation_entry, 2],
    ['SAME_AS                        ',clc$nominal_entry, 2],
    ['SERIAL_NUMBER                  ',clc$nominal_entry, 5],
    ['SI                             ',clc$abbreviation_entry, 12],
    ['SITE_INFORMATION               ',clc$nominal_entry, 12],
    ['SN                             ',clc$abbreviation_entry, 5],
    ['STATE                          ',clc$nominal_entry, 6],
    ['STATUS                         ',clc$nominal_entry, 13],
    ['VEI                            ',clc$abbreviation_entry, 10],
    ['VERIFY_ELEMENT_IDENTIFICATION  ',clc$nominal_entry, 10]],
    [
{ PARAMETER 1
    [8, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [21, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$optional_parameter, 0
  , 0],
{ PARAMETER 3
    [9, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 2437,
  clc$optional_parameter, 0, 0],
{ PARAMETER 4
    [14, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 69, clc$optional_parameter,
  0, 0],
{ PARAMETER 5
    [22, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 20, clc$optional_parameter,
  0, 0],
{ PARAMETER 6
    [26, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 118,
  clc$optional_parameter, 0, 0],
{ PARAMETER 7
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 120,
  clc$optional_parameter, 0, 0],
{ PARAMETER 8
    [12, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 202,
  clc$optional_parameter, 0, 0],
{ PARAMETER 9
    [17, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 120,
  clc$optional_parameter, 0, 0],
{ PARAMETER 10
    [29, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$optional_parameter, 0
  , 0],
{ PARAMETER 11
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$optional_parameter, 0
  , 0],
{ PARAMETER 12
    [24, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$optional_parameter, 0
  , 0],
{ PARAMETER 13
    [27, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 2
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 3
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
    FALSE, 2],
    2412, [[1, 0, clc$keyword_type], [65], [
      ['$10395_11                      ', clc$nominal_entry, clc$normal_usage_entry, 40],
      ['$2620_XXX                      ', clc$nominal_entry, clc$normal_usage_entry, 60],
      ['$2621_XXX                      ', clc$nominal_entry, clc$normal_usage_entry, 61],
      ['$2629_X                        ', clc$nominal_entry, clc$normal_usage_entry, 62],
      ['$380_170                       ', clc$nominal_entry, clc$normal_usage_entry, 63],
      ['$4000_XX                       ', clc$nominal_entry, clc$normal_usage_entry, 59],
      ['$47444_1                       ', clc$nominal_entry, clc$normal_usage_entry, 26],
      ['$47444_1P                      ', clc$nominal_entry, clc$normal_usage_entry, 27],
      ['$47444_2                       ', clc$nominal_entry, clc$normal_usage_entry, 28],
      ['$47444_3P                      ', clc$nominal_entry, clc$normal_usage_entry, 29],
      ['$47444_4                       ', clc$nominal_entry, clc$normal_usage_entry, 30],
      ['$5380_100                      ', clc$nominal_entry, clc$normal_usage_entry, 64],
      ['$5680_11                       ', clc$nominal_entry, clc$normal_usage_entry, 46],
      ['$5682_1X                       ', clc$nominal_entry, clc$normal_usage_entry, 47],
      ['$5698_1X                       ', clc$nominal_entry, clc$normal_usage_entry, 48],
      ['$5831_X                        ', clc$nominal_entry, clc$normal_usage_entry, 43],
      ['$5832_1                        ', clc$nominal_entry, clc$normal_usage_entry, 9],
      ['$5832_2                        ', clc$nominal_entry, clc$normal_usage_entry, 10],
      ['$5833_1                        ', clc$nominal_entry, clc$normal_usage_entry, 11],
      ['$5833_1P                       ', clc$nominal_entry, clc$normal_usage_entry, 12],
      ['$5833_2                        ', clc$nominal_entry, clc$normal_usage_entry, 13],
      ['$5833_3P                       ', clc$nominal_entry, clc$normal_usage_entry, 14],
      ['$5833_4                        ', clc$nominal_entry, clc$normal_usage_entry, 15],
      ['$5837_1                        ', clc$nominal_entry, clc$normal_usage_entry, 16],
      ['$5837_1P                       ', clc$nominal_entry, clc$normal_usage_entry, 17],
      ['$5837_2                        ', clc$nominal_entry, clc$normal_usage_entry, 18],
      ['$5837_3P                       ', clc$nominal_entry, clc$normal_usage_entry, 19],
      ['$5837_4                        ', clc$nominal_entry, clc$normal_usage_entry, 20],
      ['$5838_1                        ', clc$nominal_entry, clc$normal_usage_entry, 21],
      ['$5838_1P                       ', clc$nominal_entry, clc$normal_usage_entry, 22],
      ['$5838_2                        ', clc$nominal_entry, clc$normal_usage_entry, 23],
      ['$5838_3P                       ', clc$nominal_entry, clc$normal_usage_entry, 24],
      ['$5838_4                        ', clc$nominal_entry, clc$normal_usage_entry, 25],
      ['$639_1                         ', clc$nominal_entry, clc$normal_usage_entry, 49],
      ['$65354_1X                      ', clc$nominal_entry, clc$normal_usage_entry, 58],
      ['$679_X                         ', clc$nominal_entry, clc$normal_usage_entry, 50],
      ['$698_1X                        ', clc$nominal_entry, clc$normal_usage_entry, 51],
      ['$698_2X                        ', clc$nominal_entry, clc$normal_usage_entry, 52],
      ['$698_3X                        ', clc$nominal_entry, clc$normal_usage_entry, 53],
      ['$7021_3X                       ', clc$nominal_entry, clc$normal_usage_entry, 54],
      ['$7040_200                      ', clc$nominal_entry, clc$normal_usage_entry, 65],
      ['$7155_1                        ', clc$nominal_entry, clc$normal_usage_entry, 37],
      ['$7155_1X                       ', clc$nominal_entry, clc$normal_usage_entry, 38],
      ['$7165_2X                       ', clc$nominal_entry, clc$normal_usage_entry, 39],
      ['$7221_1                        ', clc$nominal_entry, clc$normal_usage_entry, 55],
      ['$7221_11                       ', clc$nominal_entry, clc$normal_usage_entry, 56],
      ['$834_12                        ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['$836_XXX                       ', clc$nominal_entry, clc$normal_usage_entry, 2],
      ['$844_4X                        ', clc$nominal_entry, clc$normal_usage_entry, 3],
      ['$885_1X                        ', clc$nominal_entry, clc$normal_usage_entry, 4],
      ['$887_1                         ', clc$nominal_entry, clc$normal_usage_entry, 5],
      ['$895_2                         ', clc$nominal_entry, clc$normal_usage_entry, 6],
      ['$9639_1                        ', clc$nominal_entry, clc$normal_usage_entry, 57],
      ['$9836_1                        ', clc$nominal_entry, clc$normal_usage_entry, 7],
      ['$9853_X                        ', clc$nominal_entry, clc$normal_usage_entry, 8],
      ['$FA7B4_D                       ', clc$nominal_entry, clc$normal_usage_entry, 41],
      ['$FA7B5_A                       ', clc$nominal_entry, clc$normal_usage_entry, 42],
      ['$NTDC_1                        ', clc$nominal_entry, clc$normal_usage_entry, 44],
      ['$NTDC_2                        ', clc$nominal_entry, clc$normal_usage_entry, 45],
      ['$NTDD_1                        ', clc$nominal_entry, clc$normal_usage_entry, 31],
      ['$NTDD_2                        ', clc$nominal_entry, clc$normal_usage_entry, 32],
      ['$NTDD_3                        ', clc$nominal_entry, clc$normal_usage_entry, 33],
      ['$NTDD_4                        ', clc$nominal_entry, clc$normal_usage_entry, 34],
      ['$NTDD_5                        ', clc$nominal_entry, clc$normal_usage_entry, 35],
      ['$NTDD_6                        ', clc$nominal_entry, clc$normal_usage_entry, 36]]
      ],
    5, [[1, 0, clc$name_type], [1, 10]]
    ],
{ PARAMETER 4
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
    FALSE, 2],
    44, [[1, 0, clc$keyword_type], [1], [
      ['NONE                           ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ],
    5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
    ],
{ PARAMETER 5
    [[1, 0, clc$integer_type], [1, 999999, 10]],
{ PARAMETER 6
    [[1, 0, clc$keyword_type], [3], [
    ['DOWN                           ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['OFF                            ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['ON                             ', clc$nominal_entry, clc$normal_usage_entry, 3]]
    ],
{ PARAMETER 7
    [[1, 0, clc$list_type], [104, 1, CLC$MAX_VALUE_SETS, 0, FALSE, FALSE],
      [[1, 0, clc$record_type], [2],
      ['PORT                           ', clc$required_field, 20], [[1, 0, clc$integer_type], [0, 3, 10]],
      ['MAINFRAME                      ', clc$optional_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]]
      ]
    ],
{ PARAMETER 8
    [[1, 0, clc$list_type], [186, 1, CLC$MAX_VALUE_SETS, 0, FALSE, FALSE],
      [[1, 0, clc$record_type], [4],
      ['CHANNEL                        ', clc$required_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]],
      ['EQUIPMENT                      ', clc$optional_field, 20], [[1, 0, clc$integer_type], [0, 7, 10]],
      ['MAINFRAME                      ', clc$optional_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]],
      ['IOU                            ', clc$optional_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]]
      ]
    ],
{ PARAMETER 9
    [[1, 0, clc$list_type], [104, 1, CLC$MAX_VALUE_SETS, 0, FALSE, FALSE],
      [[1, 0, clc$record_type], [2],
      ['PERIPHERAL_ELEMENT             ', clc$required_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]],
      ['PHYSICAL_ADDRESS               ', clc$optional_field, 20], [[1, 0, clc$integer_type], [0, 0ffff(16),
  10]]
      ]
    ],
{ PARAMETER 10
    [[1, 0, clc$boolean_type]],
{ PARAMETER 11
    [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]],
{ PARAMETER 12
    [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]],
{ PARAMETER 13
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$element = 1,
      p$same_as = 2,
      p$element_identification = 3,
      p$iou_program_name = 4,
      p$serial_number = 5,
      p$state = 6,
      p$central_memory_connection = 7,
      p$iou_connection = 8,
      p$peripheral_connection = 9,
      p$verify_element_identification = 10,
      p$application_information = 11,
      p$site_information = 12,
      p$status = 13;

    VAR
      pvt: array [1 .. 13] of clt$parameter_value;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    cmp$change_definition (^pvt, status);

  PROCEND cmp$change_element_def;
?? OLDTITLE ??
?? NEWTITLE := 'CMP$CHANGE_ELEMENT_NAME', EJECT ??

{ PURPOSE :
{   This procedure is the command processor for the PCU editor command CHANGE_ELEMENT_NAME.

  PROCEDURE [XDCL] cmp$change_element_name
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (cmm$edipc_chaen) change_element_name, chaen (
{   element, e: name = $required
{   new_element_name, nen: name = $required
{   change_references, change_reference, cr: boolean = true
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 8] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type3: record
        header: clt$type_specification_header,
        default_value: string (4),
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [88, 11, 10, 13, 14, 49, 27],
    clc$command, 8, 4, 2, 0, 0, 0, 4, 'CMM$EDIPC_CHAEN'], [
    ['CHANGE_REFERENCE               ',clc$alias_entry, 3],
    ['CHANGE_REFERENCES              ',clc$nominal_entry, 3],
    ['CR                             ',clc$abbreviation_entry, 3],
    ['E                              ',clc$abbreviation_entry, 1],
    ['ELEMENT                        ',clc$nominal_entry, 1],
    ['NEN                            ',clc$abbreviation_entry, 2],
    ['NEW_ELEMENT_NAME               ',clc$nominal_entry, 2],
    ['STATUS                         ',clc$nominal_entry, 4]],
    [
{ PARAMETER 1
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [7, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$required_parameter, 0
  , 0],
{ PARAMETER 3
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_default_parameter, 0, 4],
{ PARAMETER 4
    [8, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 2
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 3
    [[1, 0, clc$boolean_type],
    'true'],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$element = 1,
      p$new_element_name = 2,
      p$change_references = 3,
      p$status = 4;

    VAR
      pvt: array [1 .. 4] of clt$parameter_value;


    VAR
      change_references: boolean,
      element_name: cmt$element_name,
      new_element_name: cmt$element_name;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    element_name := pvt [p$element].value^.name_value;
    new_element_name := pvt [p$new_element_name].value^.name_value;
    change_references := pvt [p$change_references].value^.boolean_value.value;

    cmp$change_definition_name (element_name, new_element_name, change_references, status);

  PROCEND cmp$change_element_name;
?? OLDTITLE ??
?? NEWTITLE := 'CMP$DELETE_ELEMENT_DEF', EJECT ??

{ PURPOSE :
{   This procedure is the command processor for the PCU editor command DELETE_ELEMENT_DEFINITION.

  PROCEDURE [XDCL] cmp$delete_element_def
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE (cmm$edipc_deled) delete_element_definition, deled (
{   element, elements, e: any of
{       list of name
{       key
{         all
{       keyend
{     anyend = $required
{   retain, r: list of name = $optional
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 6] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [88, 11, 10, 13, 15, 15, 276],
    clc$command, 6, 3, 1, 0, 0, 0, 3, 'CMM$EDIPC_DELED'], [
    ['E                              ',clc$abbreviation_entry, 1],
    ['ELEMENT                        ',clc$nominal_entry, 1],
    ['ELEMENTS                       ',clc$alias_entry, 1],
    ['R                              ',clc$abbreviation_entry, 2],
    ['RETAIN                         ',clc$nominal_entry, 2],
    ['STATUS                         ',clc$nominal_entry, 3]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 85, clc$required_parameter,
  0, 0],
{ PARAMETER 2
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 21, clc$optional_parameter,
  0, 0],
{ PARAMETER 3
    [6, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$list_type],
    FALSE, 2],
    21, [[1, 0, clc$list_type], [5, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$name_type], [1, osc$max_name_size]]
      ],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$list_type], [5, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$name_type], [1, osc$max_name_size]]
    ],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$element = 1,
      p$retain = 2,
      p$status = 3;

    VAR
      pvt: array [1 .. 3] of clt$parameter_value;

    VAR
      v$answer_table: [READ, oss$job_paged_literal] array [1 .. 2] of cmt$answer_prompt_table_entry := [
{ } ['Y', 1, 'YES', 3, 'Delete all element defintions', 29],
{ } ['N', 1, 'NO ', 2, 'Do not delete all element definitions', 37]];

    VAR
      current_list_entry: ^clt$data_value,
      delete_element_list_p: ^array [ * ] of ost$name,
      exclude_list_p: ^array [ * ] of ost$name,
      interactive: boolean,
      list_index: integer,
      number_of_entries: integer,
      selection: integer;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    delete_element_list_p := NIL;
    exclude_list_p := NIL;
    number_of_entries := clp$count_list_elements (pvt [p$element].value);
    IF number_of_entries > 0 THEN
      PUSH delete_element_list_p: [1 .. number_of_entries];
      current_list_entry := pvt [p$element].value;
      FOR list_index := 1 TO clp$count_list_elements (pvt [p$element].value) DO
        delete_element_list_p^ [list_index] := current_list_entry^.element_value^.name_value;
        current_list_entry := current_list_entry^.link;
      FOREND;
    IFEND;
    IF pvt [p$retain].specified THEN
      number_of_entries := clp$count_list_elements (pvt [p$retain].value);
      IF number_of_entries > 0 THEN
        PUSH exclude_list_p: [1 .. number_of_entries];
        current_list_entry := pvt [p$retain].value;
        FOR list_index := 1 TO number_of_entries DO
          exclude_list_p^ [list_index] := current_list_entry^.element_value^.name_value;
          current_list_entry := current_list_entry^.link;
        FOREND;
      IFEND;
    IFEND;
    IF delete_element_list_p <> NIL THEN

    /delete_element_loop/
      FOR list_index := LOWERBOUND (delete_element_list_p^) TO UPPERBOUND (delete_element_list_p^) DO
        IF delete_element_list_p^ [list_index] <> 'ALL' THEN

{ Error if specified RETAIN.

          IF pvt [p$retain].specified THEN
            osp$set_status_condition (cme$pcu_invalid_use_of_retain, status);
            RETURN; {----->
          IFEND;
          cmp$delete_definition (delete_element_list_p^ [list_index], status);
          IF NOT status.normal THEN
            RETURN; {----->
          IFEND;
        ELSE
          clp$get_command_origin (interactive, status);
          IF NOT status.normal THEN
            RETURN; {----->
          IFEND;
          IF interactive THEN
            cmp$prompt_for_answer (' Do you really want to delete all elements?', ' Enter yes or no:',
                  '--ERROR-- You must enter YES or NO. Please try again.', v$answer_table, selection);
            IF selection <> 1 THEN
              RETURN; {----->
            IFEND;
          IFEND;
          cmp$delete_all_elements (exclude_list_p, status);
          EXIT /delete_element_loop/; {----->
        IFEND;
      FOREND /delete_element_loop/;
    IFEND;

  PROCEND cmp$delete_element_def;
?? OLDTITLE ??
?? NEWTITLE := 'CMP$DISPLAY_MF_CONNECTIONS', EJECT ??

{ PURPOSE :
{   This procedure is the command processor for the PCU editor command DISPLAY_CONNECTED_ELEMENTS

  PROCEDURE [XDCL] cmp$display_mf_connections
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (cmm$edipc_disce) display_connected_elements, display_connected_element, disce (
{   element, e: any of
{       key
{         (channel, c)
{         (iou, i)
{         (mainframe, m)
{       keyend
{       name
{     anyend = mainframe
{   channel, c: name = $optional
{   iou: name = IOU0
{   mainframe, m: name = $name($mainframe(identifier))
{   type, t: key
{       (logically_on, lo, on)
{       (logically_accessible, la)
{       (physically_accessible, pa)
{     keyend = logically_on
{   display_options, display_option, do: list of key
{       all
{       (element_identification, ei)
{       (iou_program_name, ipn)
{       (name, n)
{       (serial_number, sn)
{       (state, s)
{       (verify_element_identification, vei)
{     keyend = all
{   output, o: file = $output
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 15] of clt$pdt_parameter_name,
      parameters: array [1 .. 8] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 6] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        default_value: string (9),
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
        default_value: string (4),
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
        default_value: string (29),
      recend,
      type5: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 7] of clt$keyword_specification,
        default_value: string (12),
      recend,
      type6: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 13] of clt$keyword_specification,
        recend,
        default_value: string (3),
      recend,
      type7: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type8: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [104, 5, 5, 13, 39, 50, 352],
    clc$command, 15, 8, 0, 0, 0, 0, 8, 'CMM$EDIPC_DISCE'], [
    ['C                              ',clc$abbreviation_entry, 2],
    ['CHANNEL                        ',clc$nominal_entry, 2],
    ['DISPLAY_OPTION                 ',clc$alias_entry, 6],
    ['DISPLAY_OPTIONS                ',clc$nominal_entry, 6],
    ['DO                             ',clc$abbreviation_entry, 6],
    ['E                              ',clc$abbreviation_entry, 1],
    ['ELEMENT                        ',clc$nominal_entry, 1],
    ['IOU                            ',clc$nominal_entry, 3],
    ['M                              ',clc$abbreviation_entry, 4],
    ['MAINFRAME                      ',clc$nominal_entry, 4],
    ['O                              ',clc$abbreviation_entry, 7],
    ['OUTPUT                         ',clc$nominal_entry, 7],
    ['STATUS                         ',clc$nominal_entry, 8],
    ['T                              ',clc$abbreviation_entry, 5],
    ['TYPE                           ',clc$nominal_entry, 5]],
    [
{ PARAMETER 1
    [7, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 254,
  clc$optional_default_parameter, 0, 9],
{ PARAMETER 2
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$optional_parameter, 0
  , 0],
{ PARAMETER 3
    [8, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5,
  clc$optional_default_parameter, 0, 4],
{ PARAMETER 4
    [10, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5,
  clc$optional_default_parameter, 0, 29],
{ PARAMETER 5
    [15, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 266,
  clc$optional_default_parameter, 0, 12],
{ PARAMETER 6
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 504,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 7
    [12, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 8
    [13, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
    FALSE, 2],
    229, [[1, 0, clc$keyword_type], [6], [
      ['C                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
      ['CHANNEL                        ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['I                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
      ['IOU                            ', clc$nominal_entry, clc$normal_usage_entry, 2],
      ['M                              ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
      ['MAINFRAME                      ', clc$nominal_entry, clc$normal_usage_entry, 3]]
      ],
    5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
    ,
    'mainframe'],
{ PARAMETER 2
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 3
    [[1, 0, clc$name_type], [1, osc$max_name_size],
    'IOU0'],
{ PARAMETER 4
    [[1, 0, clc$name_type], [1, osc$max_name_size],
    '$name($mainframe(identifier))'],
{ PARAMETER 5
    [[1, 0, clc$keyword_type], [7], [
    ['LA                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['LO                             ', clc$alias_entry, clc$normal_usage_entry, 1],
    ['LOGICALLY_ACCESSIBLE           ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['LOGICALLY_ON                   ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['ON                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['PA                             ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
    ['PHYSICALLY_ACCESSIBLE          ', clc$nominal_entry, clc$normal_usage_entry, 3]]
    ,
    'logically_on'],
{ PARAMETER 6
    [[1, 0, clc$list_type], [488, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$keyword_type], [13], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['EI                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
      ['ELEMENT_IDENTIFICATION         ', clc$nominal_entry, clc$normal_usage_entry, 2],
      ['IOU_PROGRAM_NAME               ', clc$nominal_entry, clc$normal_usage_entry, 3],
      ['IPN                            ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
      ['N                              ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
      ['NAME                           ', clc$nominal_entry, clc$normal_usage_entry, 4],
      ['S                              ', clc$abbreviation_entry, clc$normal_usage_entry, 6],
      ['SERIAL_NUMBER                  ', clc$nominal_entry, clc$normal_usage_entry, 5],
      ['SN                             ', clc$abbreviation_entry, clc$normal_usage_entry, 5],
      ['STATE                          ', clc$nominal_entry, clc$normal_usage_entry, 6],
      ['VEI                            ', clc$abbreviation_entry, clc$normal_usage_entry, 7],
      ['VERIFY_ELEMENT_IDENTIFICATION  ', clc$nominal_entry, clc$normal_usage_entry, 7]]
      ]
    ,
    'all'],
{ PARAMETER 7
    [[1, 0, clc$file_type],
    '$output'],
{ PARAMETER 8
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$element = 1,
      p$channel = 2,
      p$iou = 3,
      p$mainframe = 4,
      p$type = 5,
      p$display_options = 6,
      p$output = 7,
      p$status = 8;

    VAR
      pvt: array [1 .. 8] of clt$parameter_value;

*copyc clv$display_variables
*copyc cmc$minimum_page_size

    VAR
      access_type: t$access_type,
      channel: cmt$element_name,
      current_list_entry: ^clt$data_value,
      element_option_value: ost$name,
      element_type: cmt$element_type,
      display_control: clt$display_control,
      display_options_array: ^array [ * ] of ost$name,
      file: clt$file,
      header: string (50),
      i: integer,
      ignore_status: ost$status,
      iou: cmt$element_name,
      mainframe: cmt$element_name,
      number_of_entries: integer,
      output_open: boolean;

?? NEWTITLE := 'ABORT_HANDLER', EJECT ??

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

      IF output_open THEN
        clp$close_display (display_control, ignore_status);
        output_open := FALSE;
      IFEND;

    PROCEND abort_handler;
*copy clp$new_page_procedure

?? OLDTITLE ??
?? NEWTITLE := 'PRINT_SUBTITLE', EJECT ??

    PROCEDURE print_subtitle
      (    header: string (50);
       VAR status: ost$status);


      clp$put_partial_display (display_control, header, clc$trim, amc$continue, status);

      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;

    PROCEND print_subtitle;
?? OLDTITLE ??
?? NEWTITLE := 'PUT_SUBTITLE', EJECT ??

    PROCEDURE put_subtitle
      (VAR display_control: clt$display_control;
       VAR status: ost$status);

      print_subtitle (header, status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;

    PROCEND put_subtitle;

?? OLDTITLE ??
?? EJECT ??

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

  /main_program/
    BEGIN
      output_open := FALSE;
      osp$establish_block_exit_hndlr (^abort_handler);
      clp$convert_string_to_file (pvt [p$output].value^.file_value^, file, status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;

      header := '  ';
      clp$open_display (file, ^clp$new_page_procedure, display_control, status);
      IF NOT status.normal THEN
        EXIT /main_program/; {----->
      IFEND;
      output_open := TRUE;

      IF display_control.page_width < cmc$minimum_page_size THEN
        osp$set_status_abnormal (cmc$configuration_management_id, cme$lcu_illegal_output_file,
              file.local_file_name, status);
        osp$append_status_integer (osc$status_parameter_delimiter, cmc$minimum_page_size, 10, FALSE, status);
        EXIT /main_program/; {----->
      IFEND;

      clv$titles_built := FALSE;
      clv$command_name := 'display_connected_elements';
      clp$new_display_line (display_control, 1, status);
      IF NOT status.normal THEN
        EXIT /main_program/; {----->
      IFEND;
      clp$put_partial_display (display_control,
            'Element                          Product   State Serial Driver  VEI   ', clc$trim, amc$terminate,
            status);
      IF NOT status.normal THEN
        EXIT /main_program/; {----->
      IFEND;
      clp$put_partial_display (display_control,
            'Name                             Id              Number Name          ', clc$trim, amc$terminate,
            status);
      IF NOT status.normal THEN
        EXIT /main_program/; {----->
      IFEND;

      clp$put_partial_display (display_control,
            '===================================================================== ', clc$trim, amc$terminate,
            status);
      IF NOT status.normal THEN
        EXIT /main_program/; {----->
      IFEND;
      number_of_entries := clp$count_list_elements (pvt [p$display_options].value);
      IF number_of_entries > 0 THEN
        PUSH display_options_array: [1 .. number_of_entries];
        current_list_entry := pvt [p$display_options].value;
        FOR i := 1 TO clp$count_list_elements (pvt [p$display_options].value) DO
          display_options_array^ [i] := current_list_entry^.element_value^.name_value;
          current_list_entry := current_list_entry^.link;
        FOREND;
      IFEND;

      element_option_value := pvt [p$element].value^.name_value;
      IF pvt [p$channel].specified THEN
        channel := pvt [p$channel].value^.name_value;
      ELSEIF element_option_value = 'CHANNEL' THEN
        osp$set_status_abnormal (cmc$configuration_management_id, 0,
              'Need channel name if element is channel.', status);
        EXIT /main_program/; {----->
      IFEND;

      iou := pvt [p$iou].value^.name_value;
      mainframe := pvt [p$mainframe].value^.name_value;

      IF pvt [p$type].value^.name_value = 'PHYSICALLY_ACCESSIBLE' THEN
        access_type := c$at_physical_accessible;
      ELSEIF pvt [p$type].value^.name_value = 'LOGICALLY_ACCESSIBLE' THEN
        access_type := c$at_logically_accessible;
      ELSE
        access_type := c$at_logically_on;
      IFEND;

      p$display_mf_elements (element_option_value, display_options_array, channel, iou, mainframe,
            access_type, display_control, status);
      IF NOT status.normal THEN
        EXIT /main_program/; {----->
      IFEND;
    END /main_program/;

    IF output_open THEN
      clp$close_display (display_control, ignore_status);
      output_open := FALSE;
    IFEND;

    osp$disestablish_cond_handler;

  PROCEND cmp$display_mf_connections;
?? OLDTITLE ??
?? NEWTITLE := 'CMP$DISPLAY_ELEMENT_DEF', EJECT ??

{ PURPOSE :
{   This procedure is the command processor for the PCU editor command DISPLAY_ELEMENT_DEFINITION.

  PROCEDURE [XDCL] cmp$display_element_def
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (cmm$edipc_dised) display_element_definition, dised (
{   elements, element, e: list of any of
{       key
{         all, $channel_adapter, $communications_element, $controller, $external_processor, $storage_device
{       keyend
{       name
{     anyend = all
{   output, o: file = $output
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 6] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$union_type_qualifier,
          type_size_1: clt$type_specification_size,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 6] of clt$keyword_specification,
          recend,
          type_size_2: clt$type_specification_size,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
        default_value: string (3),
      recend,
      type2: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [88, 11, 10, 13, 16, 11, 92],
    clc$command, 6, 3, 0, 0, 0, 0, 3, 'CMM$EDIPC_DISED'], [
    ['E                              ',clc$abbreviation_entry, 1],
    ['ELEMENT                        ',clc$alias_entry, 1],
    ['ELEMENTS                       ',clc$nominal_entry, 1],
    ['O                              ',clc$abbreviation_entry, 2],
    ['OUTPUT                         ',clc$nominal_entry, 2],
    ['STATUS                         ',clc$nominal_entry, 3]],
    [
{ PARAMETER 1
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 270,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 2
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 3
    [6, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$list_type], [254, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
      FALSE, 2],
      229, [[1, 0, clc$keyword_type], [6], [
        ['$CHANNEL_ADAPTER               ', clc$nominal_entry, clc$normal_usage_entry, 2],
        ['$COMMUNICATIONS_ELEMENT        ', clc$nominal_entry, clc$normal_usage_entry, 3],
        ['$CONTROLLER                    ', clc$nominal_entry, clc$normal_usage_entry, 4],
        ['$EXTERNAL_PROCESSOR            ', clc$nominal_entry, clc$normal_usage_entry, 5],
        ['$STORAGE_DEVICE                ', clc$nominal_entry, clc$normal_usage_entry, 6],
        ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
        ],
      5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
      ]
    ,
    'all'],
{ PARAMETER 2
    [[1, 0, clc$file_type],
    '$output'],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$elements = 1,
      p$output = 2,
      p$status = 3;

    VAR
      pvt: array [1 .. 3] of clt$parameter_value;

    VAR
      cmv$key_display_options: [STATIC, READ, oss$job_paged_literal] array [cmt$lcu_display_option_key] of
            ost$name := [cmc$lcu_all_inclusive_keyword, cmc$lcu_channel_keyword, cmc$lcu_controller_keyword,
            cmc$lcu_storage_device_keyword, cmc$lcu_channel_adapter_kw, cmc$lcu_external_processor_kw,
            cmc$lcu_communications_keyword];

    VAR
      current_list_entry: ^clt$data_value,
      display_option_key: cmt$lcu_display_option_key,
      file_id: amt$file_identifier,
      file: clt$file,
      list_index: integer,
      local_status: ost$status,
      name: ost$name,
      number_of_entries: integer;

  /main_program/
    BEGIN
      clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;
      clp$convert_string_to_file (pvt [p$output].value^.file_value^, file, status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;
      fsp$open_file (file.local_file_name, amc$record, NIL, NIL, NIL, NIL, NIL, file_id, status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;
      current_list_entry := pvt [p$elements].value;
      number_of_entries := clp$count_list_elements (pvt [p$element].value);
      IF number_of_entries > 0 THEN

      /process_element_list/
        FOR list_index := 1 TO number_of_entries DO
          name := current_list_entry^.element_value^.name_value;
          FOR display_option_key := LOWERVALUE (display_option_key) TO UPPERVALUE (display_option_key) DO
            IF name = cmv$key_display_options [display_option_key] THEN
              cmp$display_elements_def (display_option_key, FALSE, name, file_id, status);
              IF NOT status.normal THEN
                EXIT /main_program/; {----->
              IFEND;
              current_list_entry := current_list_entry^.link;
              CYCLE /process_element_list/; {----->
            IFEND;
          FOREND;
          cmp$display_elements_def (display_option_key, TRUE, name, file_id, status);
          IF NOT status.normal THEN
            EXIT /main_program/; {----->
          IFEND;
          current_list_entry := current_list_entry^.link;
        FOREND /process_element_list/;
      IFEND;
    END /main_program/;

    fsp$close_file (file_id, local_status);

  PROCEND cmp$display_element_def;
?? OLDTITLE ??
?? NEWTITLE := 'CMP$QUIT_EDIT', EJECT ??

{ PURPOSE :
{    This procedure is the command processor for the PCU editor command QUIT.

  PROCEDURE [XDCL] cmp$quit_edit
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (cmm$edipc_quit) quit, qui (
{   write_physical_configuration, wpc: boolean = true
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 3] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        default_value: string (4),
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [88, 11, 10, 13, 16, 41, 910],
    clc$command, 3, 2, 0, 0, 0, 0, 2, 'CMM$EDIPC_QUIT'], [
    ['STATUS                         ',clc$nominal_entry, 2],
    ['WPC                            ',clc$abbreviation_entry, 1],
    ['WRITE_PHYSICAL_CONFIGURATION   ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_default_parameter, 0, 4],
{ PARAMETER 2
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$boolean_type],
    'true'],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$write_physical_configuration = 1,
      p$status = 2;

    VAR
      pvt: array [1 .. 2] of clt$parameter_value;

    VAR
      update_pc: boolean;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    update_pc := pvt [p$write_physical_configuration].value^.boolean_value.value;
    IF update_pc THEN
      cmp$update_output_file (status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;
    ELSE
      cmp$clean_up_list;
    IFEND;

    cmp$close_in_out_files;

    clp$end_scan_command_file ('PHYSICAL_CONFIGURATION_EDITOR  ', status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;
    cmp$set_exec_in_editor (FALSE);
    cmp$set_in_editor (FALSE);

  PROCEND cmp$quit_edit;
?? OLDTITLE ??
?? NEWTITLE := 'CMP$REPLACE_ELEMENT_DEF', EJECT ??

{ PURPOSE :
{    This procedure is the command processor for the PCU editor command REPLACE_ELEMENT_DEFINITION.

  PROCEDURE [XDCL] cmp$replace_element_def
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (cmm$edipc_reped) replace_element_definition, reped (
{   element, e: name = $required
{   same_as, sa: name = $optional
{   element_identification, ei: any of
{       key
{         $834_12, $836_xxx, $844_4x, $885_1x, $887_1, $895_2, $9836_1, $9853_x, $5832_1, $5832_2, $5833_1
{         $5833_1p, $5833_2, $5833_3p, $5833_4, $5837_1, $5837_1p, $5837_2, $5837_3p, $5837_4, $5838_1, $583..
{ 8_1p
{         $5838_2, $5838_3p, $5838_4, $47444_1, $47444_1p, $47444_2, $47444_3p, $47444_4, $ntdd_1, $ntdd_2
{         $ntdd_3, $ntdd_4, $ntdd_5, $ntdd_6, $7155_1, $7155_1x, $7165_2x, $10395_11, $fa7b4_d, $fa7b5_a
{         $5831_x, $ntdc_1, $ntdc_2, $5680_11, $5682_1x, $5698_1x, $639_1, $679_x, $698_1x, $698_2x, $698_3x
{         $7021_3x, $7221_1, $7221_11, $9639_1, $65354_1x, $4000_xx, $2620_xxx, $2621_xxx, $2629_x, $380_170
{         $5380_100, $7040_200
{       keyend
{       name 1..10
{     anyend = $optional
{   iou_program_name, ioupn, ipn: name = $optional
{   serial_number, sn: integer 1..999999 = $optional
{   state, s: key
{       down, off, on
{     keyend = on
{   central_memory_connection, central_memory_connections, cmc: list 1..CLC$MAX_VALUE_SETS of record
{       port: integer 0..3
{       mainframe: name = $optional
{     recend = $optional
{   iou_connection, iou_connections, ic: list 1..CLC$MAX_VALUE_SETS of record
{       channel: name
{       equipment: integer 0..7 = $optional
{       mainframe: name = $optional
{       iou: name = $optional
{     recend = $optional
{   peripheral_connection, peripheral_connections, pc: list 1..CLC$MAX_VALUE_SETS of record
{       peripheral_element: name
{       physical_address: integer 0..0ffff(16) = $optional
{     recend = $optional
{   verify_element_identification, vei: boolean = true
{   application_information, ai: string = $optional
{   site_information, si: string = $optional
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 29] of clt$pdt_parameter_name,
      parameters: array [1 .. 13] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 65] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type5: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
      type6: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 3] of clt$keyword_specification,
        default_value: string (2),
      recend,
      type7: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$integer_type_qualifier,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
      recend,
      type8: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$integer_type_qualifier,
          recend,
          field_spec_3: clt$field_specification,
          element_type_spec_3: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
          field_spec_4: clt$field_specification,
          element_type_spec_4: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
      recend,
      type9: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$integer_type_qualifier,
          recend,
        recend,
      recend,
      type10: record
        header: clt$type_specification_header,
        default_value: string (4),
      recend,
      type11: record
        header: clt$type_specification_header,
        qualifier: clt$string_type_qualifier,
      recend,
      type12: record
        header: clt$type_specification_header,
        qualifier: clt$string_type_qualifier,
      recend,
      type13: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [103, 8, 12, 17, 13, 1, 321],
    clc$command, 29, 13, 1, 0, 0, 0, 13, 'CMM$EDIPC_REPED'], [
    ['AI                             ',clc$abbreviation_entry, 11],
    ['APPLICATION_INFORMATION        ',clc$nominal_entry, 11],
    ['CENTRAL_MEMORY_CONNECTION      ',clc$nominal_entry, 7],
    ['CENTRAL_MEMORY_CONNECTIONS     ',clc$alias_entry, 7],
    ['CMC                            ',clc$abbreviation_entry, 7],
    ['E                              ',clc$abbreviation_entry, 1],
    ['EI                             ',clc$abbreviation_entry, 3],
    ['ELEMENT                        ',clc$nominal_entry, 1],
    ['ELEMENT_IDENTIFICATION         ',clc$nominal_entry, 3],
    ['IC                             ',clc$abbreviation_entry, 8],
    ['IOUPN                          ',clc$alias_entry, 4],
    ['IOU_CONNECTION                 ',clc$nominal_entry, 8],
    ['IOU_CONNECTIONS                ',clc$alias_entry, 8],
    ['IOU_PROGRAM_NAME               ',clc$nominal_entry, 4],
    ['IPN                            ',clc$abbreviation_entry, 4],
    ['PC                             ',clc$abbreviation_entry, 9],
    ['PERIPHERAL_CONNECTION          ',clc$nominal_entry, 9],
    ['PERIPHERAL_CONNECTIONS         ',clc$alias_entry, 9],
    ['S                              ',clc$abbreviation_entry, 6],
    ['SA                             ',clc$abbreviation_entry, 2],
    ['SAME_AS                        ',clc$nominal_entry, 2],
    ['SERIAL_NUMBER                  ',clc$nominal_entry, 5],
    ['SI                             ',clc$abbreviation_entry, 12],
    ['SITE_INFORMATION               ',clc$nominal_entry, 12],
    ['SN                             ',clc$abbreviation_entry, 5],
    ['STATE                          ',clc$nominal_entry, 6],
    ['STATUS                         ',clc$nominal_entry, 13],
    ['VEI                            ',clc$abbreviation_entry, 10],
    ['VERIFY_ELEMENT_IDENTIFICATION  ',clc$nominal_entry, 10]],
    [
{ PARAMETER 1
    [8, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [21, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$optional_parameter, 0
  , 0],
{ PARAMETER 3
    [9, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 2437,
  clc$optional_parameter, 0, 0],
{ PARAMETER 4
    [14, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$optional_parameter, 0
  , 0],
{ PARAMETER 5
    [22, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 20, clc$optional_parameter,
  0, 0],
{ PARAMETER 6
    [26, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 118,
  clc$optional_default_parameter, 0, 2],
{ PARAMETER 7
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 120,
  clc$optional_parameter, 0, 0],
{ PARAMETER 8
    [12, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 202,
  clc$optional_parameter, 0, 0],
{ PARAMETER 9
    [17, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 120,
  clc$optional_parameter, 0, 0],
{ PARAMETER 10
    [29, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_default_parameter, 0, 4],
{ PARAMETER 11
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$optional_parameter, 0
  , 0],
{ PARAMETER 12
    [24, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$optional_parameter, 0
  , 0],
{ PARAMETER 13
    [27, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 2
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 3
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
    FALSE, 2],
    2412, [[1, 0, clc$keyword_type], [65], [
      ['$10395_11                      ', clc$nominal_entry, clc$normal_usage_entry, 40],
      ['$2620_XXX                      ', clc$nominal_entry, clc$normal_usage_entry, 60],
      ['$2621_XXX                      ', clc$nominal_entry, clc$normal_usage_entry, 61],
      ['$2629_X                        ', clc$nominal_entry, clc$normal_usage_entry, 62],
      ['$380_170                       ', clc$nominal_entry, clc$normal_usage_entry, 63],
      ['$4000_XX                       ', clc$nominal_entry, clc$normal_usage_entry, 59],
      ['$47444_1                       ', clc$nominal_entry, clc$normal_usage_entry, 26],
      ['$47444_1P                      ', clc$nominal_entry, clc$normal_usage_entry, 27],
      ['$47444_2                       ', clc$nominal_entry, clc$normal_usage_entry, 28],
      ['$47444_3P                      ', clc$nominal_entry, clc$normal_usage_entry, 29],
      ['$47444_4                       ', clc$nominal_entry, clc$normal_usage_entry, 30],
      ['$5380_100                      ', clc$nominal_entry, clc$normal_usage_entry, 64],
      ['$5680_11                       ', clc$nominal_entry, clc$normal_usage_entry, 46],
      ['$5682_1X                       ', clc$nominal_entry, clc$normal_usage_entry, 47],
      ['$5698_1X                       ', clc$nominal_entry, clc$normal_usage_entry, 48],
      ['$5831_X                        ', clc$nominal_entry, clc$normal_usage_entry, 43],
      ['$5832_1                        ', clc$nominal_entry, clc$normal_usage_entry, 9],
      ['$5832_2                        ', clc$nominal_entry, clc$normal_usage_entry, 10],
      ['$5833_1                        ', clc$nominal_entry, clc$normal_usage_entry, 11],
      ['$5833_1P                       ', clc$nominal_entry, clc$normal_usage_entry, 12],
      ['$5833_2                        ', clc$nominal_entry, clc$normal_usage_entry, 13],
      ['$5833_3P                       ', clc$nominal_entry, clc$normal_usage_entry, 14],
      ['$5833_4                        ', clc$nominal_entry, clc$normal_usage_entry, 15],
      ['$5837_1                        ', clc$nominal_entry, clc$normal_usage_entry, 16],
      ['$5837_1P                       ', clc$nominal_entry, clc$normal_usage_entry, 17],
      ['$5837_2                        ', clc$nominal_entry, clc$normal_usage_entry, 18],
      ['$5837_3P                       ', clc$nominal_entry, clc$normal_usage_entry, 19],
      ['$5837_4                        ', clc$nominal_entry, clc$normal_usage_entry, 20],
      ['$5838_1                        ', clc$nominal_entry, clc$normal_usage_entry, 21],
      ['$5838_1P                       ', clc$nominal_entry, clc$normal_usage_entry, 22],
      ['$5838_2                        ', clc$nominal_entry, clc$normal_usage_entry, 23],
      ['$5838_3P                       ', clc$nominal_entry, clc$normal_usage_entry, 24],
      ['$5838_4                        ', clc$nominal_entry, clc$normal_usage_entry, 25],
      ['$639_1                         ', clc$nominal_entry, clc$normal_usage_entry, 49],
      ['$65354_1X                      ', clc$nominal_entry, clc$normal_usage_entry, 58],
      ['$679_X                         ', clc$nominal_entry, clc$normal_usage_entry, 50],
      ['$698_1X                        ', clc$nominal_entry, clc$normal_usage_entry, 51],
      ['$698_2X                        ', clc$nominal_entry, clc$normal_usage_entry, 52],
      ['$698_3X                        ', clc$nominal_entry, clc$normal_usage_entry, 53],
      ['$7021_3X                       ', clc$nominal_entry, clc$normal_usage_entry, 54],
      ['$7040_200                      ', clc$nominal_entry, clc$normal_usage_entry, 65],
      ['$7155_1                        ', clc$nominal_entry, clc$normal_usage_entry, 37],
      ['$7155_1X                       ', clc$nominal_entry, clc$normal_usage_entry, 38],
      ['$7165_2X                       ', clc$nominal_entry, clc$normal_usage_entry, 39],
      ['$7221_1                        ', clc$nominal_entry, clc$normal_usage_entry, 55],
      ['$7221_11                       ', clc$nominal_entry, clc$normal_usage_entry, 56],
      ['$834_12                        ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['$836_XXX                       ', clc$nominal_entry, clc$normal_usage_entry, 2],
      ['$844_4X                        ', clc$nominal_entry, clc$normal_usage_entry, 3],
      ['$885_1X                        ', clc$nominal_entry, clc$normal_usage_entry, 4],
      ['$887_1                         ', clc$nominal_entry, clc$normal_usage_entry, 5],
      ['$895_2                         ', clc$nominal_entry, clc$normal_usage_entry, 6],
      ['$9639_1                        ', clc$nominal_entry, clc$normal_usage_entry, 57],
      ['$9836_1                        ', clc$nominal_entry, clc$normal_usage_entry, 7],
      ['$9853_X                        ', clc$nominal_entry, clc$normal_usage_entry, 8],
      ['$FA7B4_D                       ', clc$nominal_entry, clc$normal_usage_entry, 41],
      ['$FA7B5_A                       ', clc$nominal_entry, clc$normal_usage_entry, 42],
      ['$NTDC_1                        ', clc$nominal_entry, clc$normal_usage_entry, 44],
      ['$NTDC_2                        ', clc$nominal_entry, clc$normal_usage_entry, 45],
      ['$NTDD_1                        ', clc$nominal_entry, clc$normal_usage_entry, 31],
      ['$NTDD_2                        ', clc$nominal_entry, clc$normal_usage_entry, 32],
      ['$NTDD_3                        ', clc$nominal_entry, clc$normal_usage_entry, 33],
      ['$NTDD_4                        ', clc$nominal_entry, clc$normal_usage_entry, 34],
      ['$NTDD_5                        ', clc$nominal_entry, clc$normal_usage_entry, 35],
      ['$NTDD_6                        ', clc$nominal_entry, clc$normal_usage_entry, 36]]
      ],
    5, [[1, 0, clc$name_type], [1, 10]]
    ],
{ PARAMETER 4
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 5
    [[1, 0, clc$integer_type], [1, 999999, 10]],
{ PARAMETER 6
    [[1, 0, clc$keyword_type], [3], [
    ['DOWN                           ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['OFF                            ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['ON                             ', clc$nominal_entry, clc$normal_usage_entry, 3]]
    ,
    'on'],
{ PARAMETER 7
    [[1, 0, clc$list_type], [104, 1, CLC$MAX_VALUE_SETS, 0, FALSE, FALSE],
      [[1, 0, clc$record_type], [2],
      ['PORT                           ', clc$required_field, 20], [[1, 0, clc$integer_type], [0, 3, 10]],
      ['MAINFRAME                      ', clc$optional_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]]
      ]
    ],
{ PARAMETER 8
    [[1, 0, clc$list_type], [186, 1, CLC$MAX_VALUE_SETS, 0, FALSE, FALSE],
      [[1, 0, clc$record_type], [4],
      ['CHANNEL                        ', clc$required_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]],
      ['EQUIPMENT                      ', clc$optional_field, 20], [[1, 0, clc$integer_type], [0, 7, 10]],
      ['MAINFRAME                      ', clc$optional_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]],
      ['IOU                            ', clc$optional_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]]
      ]
    ],
{ PARAMETER 9
    [[1, 0, clc$list_type], [104, 1, CLC$MAX_VALUE_SETS, 0, FALSE, FALSE],
      [[1, 0, clc$record_type], [2],
      ['PERIPHERAL_ELEMENT             ', clc$required_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]],
      ['PHYSICAL_ADDRESS               ', clc$optional_field, 20], [[1, 0, clc$integer_type], [0, 0ffff(16),
  10]]
      ]
    ],
{ PARAMETER 10
    [[1, 0, clc$boolean_type],
    'true'],
{ PARAMETER 11
    [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]],
{ PARAMETER 12
    [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]],
{ PARAMETER 13
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$element = 1,
      p$same_as = 2,
      p$element_identification = 3,
      p$iou_program_name = 4,
      p$serial_number = 5,
      p$state = 6,
      p$central_memory_connection = 7,
      p$iou_connection = 8,
      p$peripheral_connection = 9,
      p$verify_element_identification = 10,
      p$application_information = 11,
      p$site_information = 12,
      p$status = 13;

    VAR
      pvt: array [1 .. 13] of clt$parameter_value;

    CONST
      command_name = 'REPLACE_ELEMENT_DEFINITION';

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    cmp$crack_parameters (^pvt, command_name, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

  PROCEND cmp$replace_element_def;
?? OLDTITLE ??
MODEND cmm$pcu_editor_commands;
