?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE Physical Configuration Utility command processor' ??
MODULE cmm$phys_configuration_utl_2dd;

{ PURPOSE :
{   This module contains command processor interfaces for the NOS/VE
{   Physical Configuration Utility.

?? NEWTITLE := 'Global Declarations Referenced by This Module.', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc clc$max_value_sets
*copyc clc$standard_file_names
*copyc ame$lfn_program_actions
*copyc cme$physical_configuration_utl
*copyc clt$function_processor_table
*copyc clt$work_area
*copyc cmt$element_definition
?? POP ??
*copyc clp$begin_utility
*copyc clp$end_scan_command_file
*copyc clp$evaluate_parameters
*copyc clp$end_utility
*copyc clp$convert_string_to_file
*copyc clp$get_command_origin
*copyc clp$get_path_description
*copyc clp$get_parameter_list_text
*copyc clp$put_job_output
*copyc clp$scan_command_file
*copyc cmp$compile_phys_configuration
*copyc cmp$clean_up_list
*copyc cmp$clean_up_error_count
*copyc cmp$close_in_out_files
*copyc cmp$close_utility_files
*copyc cmp$crack_parameters
*copyc cmp$deadstart_phase
*copyc cmp$echo_command
*copyc cmp$echo_errors
*copyc cmp$increment_pcu_error_count
*copyc cmp$generate_error_listing
*copyc cmp$open_scratch_err_file
*copyc cmp$open_utility_files
*copyc cmp$post_deadstart
*copyc cmp$process_define_element
*copyc cmp$setup_mainframe_name
*copyc cmp$set_default_mainframe_name
*copyc cmp$set_exec_in_editor
*copyc cmp$set_in_editor
*copyc cmp$save_output
*copyc cmp$valid_channel_name
*copyc cmp$validate_mainframe_name
*copyc cmp$update_descriptor
*copyc osp$establish_block_exit_hndlr
*copyc osp$disestablish_cond_handler
*copyc osp$generate_error_message
*copyc osp$set_status_abnormal
*copyc osp$append_status_parameter
*copyc cmv$in_editor
*copyc cmv$executing_within_editor
*copyc cmv$pcu_error_count
*copyc osv$lower_to_upper
*copyc oss$job_paged_literal
?? EJECT ??

  CONST
    utility_name = 'PHYSICAL_CONFIGURATION_UTILITY ';


{ table pcu_command_list t=c s=local sn=oss$job_paged_literal
{ command (define_working_mainframe       ,defwm) cmp$define_working_mainframe cm=local a=hidden l=manual
{ command (define_element                 ,defe) cmp$define_element cm=local a=hidden l=manual
{ command (quit                           ,qui) cmp$quit cm=local
{ command (verify_physical_configuration  ,verpc) cmp$verify_phys_configuration cm=local
{ command (install_physical_configuration ,inspc) cmp$install_phys_configuration cm=local
{ command (edit_physical_configuration    ,edipc) cmp$edit_pc cm=local
{ tablend

?? PUSH (LISTEXT := ON) ??

  VAR
    pcu_command_list: [STATIC, READ, oss$job_paged_literal] ^clt$command_table := ^pcu_command_list_entries,

    pcu_command_list_entries: [STATIC, READ, oss$job_paged_literal] array [1 .. 12] of
          clt$command_table_entry := [
          {} ['DEFE                           ', clc$abbreviation_entry, clc$hidden_entry, 2,
          clc$manually_log, clc$linked_call, ^cmp$define_element],
          {} ['DEFINE_ELEMENT                 ', clc$nominal_entry, clc$hidden_entry, 2, clc$manually_log,
          clc$linked_call, ^cmp$define_element],
          {} ['DEFINE_WORKING_MAINFRAME       ', clc$nominal_entry, clc$hidden_entry, 1, clc$manually_log,
          clc$linked_call, ^cmp$define_working_mainframe],
          {} ['DEFWM                          ', clc$abbreviation_entry, clc$hidden_entry, 1,
          clc$manually_log, clc$linked_call, ^cmp$define_working_mainframe],
          {} ['EDIPC                          ', clc$abbreviation_entry, clc$normal_usage_entry, 6,
          clc$automatically_log, clc$linked_call, ^cmp$edit_pc],
          {} ['EDIT_PHYSICAL_CONFIGURATION    ', clc$nominal_entry, clc$normal_usage_entry, 6,
          clc$automatically_log, clc$linked_call, ^cmp$edit_pc],
          {} ['INSPC                          ', clc$abbreviation_entry, clc$normal_usage_entry, 5,
          clc$automatically_log, clc$linked_call, ^cmp$install_phys_configuration],
          {} ['INSTALL_PHYSICAL_CONFIGURATION ', clc$nominal_entry, clc$normal_usage_entry, 5,
          clc$automatically_log, clc$linked_call, ^cmp$install_phys_configuration],
          {} ['QUI                            ', clc$abbreviation_entry, clc$normal_usage_entry, 3,
          clc$automatically_log, clc$linked_call, ^cmp$quit],
          {} ['QUIT                           ', clc$nominal_entry, clc$normal_usage_entry, 3,
          clc$automatically_log, clc$linked_call, ^cmp$quit],
          {} ['VERIFY_PHYSICAL_CONFIGURATION  ', clc$nominal_entry, clc$normal_usage_entry, 4,
          clc$automatically_log, clc$linked_call, ^cmp$verify_phys_configuration],
          {} ['VERPC                          ', clc$abbreviation_entry, clc$normal_usage_entry, 4,
          clc$automatically_log, clc$linked_call, ^cmp$verify_phys_configuration]];

?? POP ??

?? OLDTITLE ??
?? NEWTITLE := '   cmp$check_reserved_names', EJECT ??

{ PURPOSE :
{    This procedure validates the element names against a list of
{    reserved keywords.

  PROCEDURE [XDCL] cmp$check_reserved_names
    (    element_name: cmt$element_name;
         reserved_names_list: ^array [ * ] of ost$name;
     VAR status: ost$status);

    VAR
      temp_string: cmt$element_name,
      text: string (60),
      c_index: cmt$channel_ordinal,
      index: integer;

    status.normal := TRUE;
    #TRANSLATE (osv$lower_to_upper, element_name, temp_string);

  /for_loop/
    FOR index := 1 TO UPPERBOUND (reserved_names_list^) DO
      IF temp_string = reserved_names_list^ [index] THEN
        text (1, * ) := 'Element name is a reserved name';
        osp$set_status_abnormal (cmc$configuration_management_id, cme$pcu_invalid_parameter, text, status);
        osp$append_status_parameter (osc$status_parameter_delimiter, temp_string, status);
        EXIT /for_loop/;
      IFEND;
    FOREND /for_loop/;
    IF status.normal THEN
      IF cmp$valid_channel_name (temp_string) THEN
        text (1, * ) := 'Element name is a reserved name';
        osp$set_status_abnormal (cmc$configuration_management_id, cme$pcu_invalid_parameter, text, status);
        osp$append_status_parameter (osc$status_parameter_delimiter, temp_string, status);
      IFEND;
    IFEND;
  PROCEND cmp$check_reserved_names;

?? OLDTITLE ??
?? NEWTITLE := '   cmp$define_element', EJECT ??

{ PURPOSE :
{    This procedure is the command processor for the PCU subcommand
{    DEFINE_ELEMENT.

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


{ PROCEDURE (cmm$pcu_defe) define_element, defe (
{   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
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 28] of clt$pdt_parameter_name,
      parameters: array [1 .. 12] 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,
    recend := [
    [1,
    [103, 8, 12, 17, 15, 50, 32],
    clc$command, 28, 12, 1, 0, 0, 0, 0, 'CMM$PCU_DEFE'], [
    ['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],
    ['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
    [28, 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 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]]];

?? 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;

    VAR
      pvt: array [1 .. 12] of clt$parameter_value;
    CONST
      command_name = 'DEFINE_ELEMENT';

    VAR
      error_string: ost$string,
      interactive: boolean,
      ignore_status: ost$status,
      param_string: string (osc$max_string_size),
      param_list_text: ^clt$parameter_list_text;


    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    IF cmv$executing_within_editor THEN
      osp$set_status_abnormal (cmc$configuration_management_id, cme$pcu_invalid_command, command_name,
              status);
      RETURN;
    IFEND;
    IF cmv$in_editor THEN
      cmp$crack_parameters (^pvt, command_name, status);
    ELSE
      cmp$process_define_element (^pvt, status);
    IFEND;
    IF NOT status.normal THEN
      clp$get_command_origin (interactive, ignore_status);
      IF NOT interactive THEN
        error_string.value := ' ';
        clp$get_parameter_list_text (^parameter_list, param_list_text, ignore_status);
        #TRANSLATE (osv$lower_to_upper, param_list_text^, param_string);
        error_string.value (1, 15) := command_name;
        IF ((17+STRLENGTH (param_string)) <= osc$max_string_size) THEN
          error_string.value (17, STRLENGTH(param_string)) := param_string (1, STRLENGTH(param_string));
          error_string.size := 17 + STRLENGTH (param_string);
        ELSE
          error_string.value (17, 240) := param_string (1, 240);
          error_string.size := osc$max_string_size;
        IFEND;
        cmp$increment_pcu_error_count;
        cmp$echo_command (error_string, ignore_status);
        cmp$echo_errors (TRUE, status);
        status.normal := TRUE;
      IFEND;
    IFEND;

  PROCEND cmp$define_element;

?? OLDTITLE ??
?? NEWTITLE := '   cmp$define_working_mainframe', EJECT ??

{ PURPOSE :
{     This procedure is the command processor for the PCU subcommand
{     DEFINE_WORKING_MAINFRAME

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


{ PROCEDURE (cmm$pcu_defwm) define_working_mainframe, defwm (
{   name, n: name = $required
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 2] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
    recend := [
    [1,
    [88, 11, 10, 13, 19, 46, 806],
    clc$command, 2, 1, 1, 0, 0, 0, 0, 'CMM$PCU_DEFWM'], [
    ['N                              ',clc$abbreviation_entry, 1],
    ['NAME                           ',clc$nominal_entry, 1]],
    [
{ 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, 5, clc$required_parameter, 0
  , 0]],
{ PARAMETER 1
    [[1, 0, clc$name_type], [1, osc$max_name_size]]];

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

    CONST
      p$name = 1;

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

    CONST
      command = 'DEFINE_WORKING_MAINFRAME';

    VAR
      error_string: ost$string,
      interactive: boolean,
      ignore_status: ost$status,
      mainframe_name: ost$name,
      param_string: string (osc$max_string_size),
      param_list_text: ^clt$parameter_list_text;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    IF cmv$executing_within_editor THEN
      osp$set_status_abnormal (cmc$configuration_management_id, cme$pcu_invalid_command, command, status);
      RETURN;
    IFEND;
    mainframe_name := pvt [p$name].value^.name_value;
    cmp$validate_mainframe_name (mainframe_name, status);
    IF status.normal THEN
      cmp$setup_mainframe_name (mainframe_name);
      RETURN;
    IFEND;
    clp$get_command_origin (interactive, ignore_status);
    IF NOT interactive AND NOT status.normal THEN
      error_string.value := '   ';
      clp$get_parameter_list_text (^parameter_list, param_list_text, ignore_status);
      #TRANSLATE (osv$lower_to_upper, param_list_text^, param_string);
      error_string.value (1, 25) := command;
      error_string.value (26, * ) := param_string;
      error_string.size := 26 + STRLENGTH (param_list_text^);
      cmp$increment_pcu_error_count;
      cmp$echo_command (error_string, ignore_status);
      cmp$echo_errors (TRUE, status);
      status.normal := TRUE;
    IFEND;

  PROCEND cmp$define_working_mainframe;

?? OLDTITLE ??
?? NEWTITLE := '   cmp$edit_pc', EJECT ??

{ PURPOSE :
{     This procedure is the command processor for the PCU command
{     EDIT_PHYSICAL_CONFIGURATION. It will start up a subutility.

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

{ PROCEDURE (cmm$pcu_edipc) edit_physical_configuration, edipc (
{   input, i: file = $local.physical_configuration
{   output, o: file = $local.physical_configuration
{   errors, error, e: file = $errors
{   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,
        default_value: string (29),
      recend,
      type2: record
        header: clt$type_specification_header,
        default_value: string (29),
      recend,
      type3: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [88, 11, 10, 13, 20, 10, 205],
    clc$command, 8, 4, 0, 0, 0, 0, 4, 'CMM$PCU_EDIPC'], [
    ['E                              ',clc$abbreviation_entry, 3],
    ['ERROR                          ',clc$alias_entry, 3],
    ['ERRORS                         ',clc$nominal_entry, 3],
    ['I                              ',clc$abbreviation_entry, 1],
    ['INPUT                          ',clc$nominal_entry, 1],
    ['O                              ',clc$abbreviation_entry, 2],
    ['OUTPUT                         ',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, 3,
  clc$optional_default_parameter, 0, 29],
{ 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, 3,
  clc$optional_default_parameter, 0, 29],
{ PARAMETER 3
    [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, 7],
{ 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$file_type],
    '$local.physical_configuration'],
{ PARAMETER 2
    [[1, 0, clc$file_type],
    '$local.physical_configuration'],
{ PARAMETER 3
    [[1, 0, clc$file_type],
    '$errors'],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$input = 1,
      p$output = 2,
      p$errors = 3,
      p$status = 4;

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

    CONST
      command = 'EDIT_PHYSICAL_CONFIGURATION';


{ table edit_pcu_command_list t=c sn=oss$job_paged_literal s=local
{ command (add_element_definition         ,added) p=cmp$add_element_def cm=xref
{ command (change_connection_reference    ,change_connection_references,chacr)     ..
{   p=cmp$change_connect_reference cm=xref
{ command (change_element_definition      ,chaed) p=cmp$change_element_def      cm=xref
{ command (change_element_name            ,chaen) p=cmp$change_element_name      cm=xref
{ command (display_element_definition     ,dised) p=cmp$display_element_def      cm=xref
{ command (display_connected_elements     ,disce)     p=cmp$display_mf_connections cm=xref
{ command (delete_element_definition      ,delete_element_definitions, deled)     p=cmp$delete_element_def ..
{    cm=xref
{ command (replace_element_definition     ,reped) p=cmp$replace_element_def     cm=xref
{ command (quit                           ,qui) p=cmp$quit_edit cm=xref
{ tablend

?? PUSH (LISTEXT := ON) ??

    VAR
      edit_pcu_command_list: [STATIC, READ, oss$job_paged_literal] ^clt$command_table :=
            ^edit_pcu_command_list_entries,

      edit_pcu_command_list_entries: [STATIC, READ, oss$job_paged_literal] array [1 .. 20] of
            clt$command_table_entry := [
            {} ['ADDED                          ', clc$abbreviation_entry, clc$normal_usage_entry, 1,
            clc$automatically_log, clc$linked_call, ^cmp$add_element_def],
            {} ['ADD_ELEMENT_DEFINITION         ', clc$nominal_entry, clc$normal_usage_entry, 1,
            clc$automatically_log, clc$linked_call, ^cmp$add_element_def],
            {} ['CHACR                          ', clc$abbreviation_entry, clc$normal_usage_entry, 2,
            clc$automatically_log, clc$linked_call, ^cmp$change_connect_reference],
            {} ['CHAED                          ', clc$abbreviation_entry, clc$normal_usage_entry, 3,
            clc$automatically_log, clc$linked_call, ^cmp$change_element_def],
            {} ['CHAEN                          ', clc$abbreviation_entry, clc$normal_usage_entry, 4,
            clc$automatically_log, clc$linked_call, ^cmp$change_element_name],
            {} ['CHANGE_CONNECTION_REFERENCE    ', clc$nominal_entry, clc$normal_usage_entry, 2,
            clc$automatically_log, clc$linked_call, ^cmp$change_connect_reference],
            {} ['CHANGE_CONNECTION_REFERENCES   ', clc$alias_entry, clc$normal_usage_entry, 2,
            clc$automatically_log, clc$linked_call, ^cmp$change_connect_reference],
            {} ['CHANGE_ELEMENT_DEFINITION      ', clc$nominal_entry, clc$normal_usage_entry, 3,
            clc$automatically_log, clc$linked_call, ^cmp$change_element_def],
            {} ['CHANGE_ELEMENT_NAME            ', clc$nominal_entry, clc$normal_usage_entry, 4,
            clc$automatically_log, clc$linked_call, ^cmp$change_element_name],
            {} ['DELED                          ', clc$abbreviation_entry, clc$normal_usage_entry, 7,
            clc$automatically_log, clc$linked_call, ^cmp$delete_element_def],
            {} ['DELETE_ELEMENT_DEFINITION      ', clc$nominal_entry, clc$normal_usage_entry, 7,
            clc$automatically_log, clc$linked_call, ^cmp$delete_element_def],
            {} ['DELETE_ELEMENT_DEFINITIONS     ', clc$alias_entry, clc$normal_usage_entry, 7,
            clc$automatically_log, clc$linked_call, ^cmp$delete_element_def],
            {} ['DISCE                          ', clc$abbreviation_entry, clc$normal_usage_entry, 6,
            clc$automatically_log, clc$linked_call, ^cmp$display_mf_connections],
            {} ['DISED                          ', clc$abbreviation_entry, clc$normal_usage_entry, 5,
            clc$automatically_log, clc$linked_call, ^cmp$display_element_def],
            {} ['DISPLAY_CONNECTED_ELEMENTS     ', clc$nominal_entry, clc$normal_usage_entry, 6,
            clc$automatically_log, clc$linked_call, ^cmp$display_mf_connections],
            {} ['DISPLAY_ELEMENT_DEFINITION     ', clc$nominal_entry, clc$normal_usage_entry, 5,
            clc$automatically_log, clc$linked_call, ^cmp$display_element_def],
            {} ['QUI                            ', clc$abbreviation_entry, clc$normal_usage_entry, 9,
            clc$automatically_log, clc$linked_call, ^cmp$quit_edit],
            {} ['QUIT                           ', clc$nominal_entry, clc$normal_usage_entry, 9,
            clc$automatically_log, clc$linked_call, ^cmp$quit_edit],
            {} ['REPED                          ', clc$abbreviation_entry, clc$normal_usage_entry, 8,
            clc$automatically_log, clc$linked_call, ^cmp$replace_element_def],
            {} ['REPLACE_ELEMENT_DEFINITION     ', clc$nominal_entry, clc$normal_usage_entry, 8,
            clc$automatically_log, clc$linked_call, ^cmp$replace_element_def]];

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

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

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

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

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

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

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

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

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

?? POP ??


{ table edit_pcu_function_list t=f sn=oss$job_paged_literal s=local
{ function ($element_definition            ,$ed) p=cmp$$element_definition cm=xref
{ tablend

?? PUSH (LISTEXT := ON) ??

    VAR
      edit_pcu_function_list: [STATIC, READ, oss$job_paged_literal] ^clt$function_processor_table :=
            ^edit_pcu_function_list_entries,

      edit_pcu_function_list_entries: [STATIC, READ, oss$job_paged_literal] array [1 .. 2] of
            clt$function_proc_table_entry := [
            {} ['$ED                            ', clc$abbreviation_entry, clc$normal_usage_entry, 1,
            clc$linked_call, ^cmp$$element_definition],
            {} ['$ELEMENT_DEFINITION            ', clc$nominal_entry, clc$normal_usage_entry, 1,
            clc$linked_call, ^cmp$$element_definition]];

    PROCEDURE [XREF] cmp$$element_definition
      (    parameter_list: clt$parameter_list;
       VAR work_area {input, output} : ^clt$work_area;
       VAR result: ^clt$data_value;
       VAR status: ost$status);

?? POP ??


    VAR
      contains_data: boolean,
      edit_pcu_name: ost$name,
      error_file: clt$file,
      file_exists: boolean,
      file_previously_opened: boolean,
      input_file: clt$file,
      input_open: boolean,
      local_status: ost$status,
      output_file: clt$file,
      output_open: boolean,
      pcu_utl_attr_p: ^clt$utility_attributes,
      set_in_editor: boolean,
      set_executing_in_editor: boolean,
      utility_attributes_p: ^clt$utility_attributes;

?? 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 input_open OR output_open THEN
        cmp$close_in_out_files;
        input_open := FALSE;
        output_open := FALSE;
      IFEND;
      handler_status.normal := TRUE;

    PROCEND abort_handler;
?? OLDTITLE, EJECT ??

  /main_program/
    BEGIN

      clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      IF cmv$executing_within_editor THEN
        osp$set_status_abnormal (cmc$configuration_management_id, cme$pcu_invalid_command, command, status);
        RETURN;
      IFEND;
      set_in_editor := FALSE;
      set_executing_in_editor := FALSE;
      output_open := FALSE;
      input_open := FALSE;
      clp$convert_string_to_file (pvt [p$input].value^.file_value^, input_file, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      clp$convert_string_to_file (pvt [p$output].value^.file_value^, output_file, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      clp$convert_string_to_file (pvt [p$errors].value^.file_value^, error_file, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      osp$establish_block_exit_hndlr (^abort_handler);
      edit_pcu_name := 'PHYSICAL_CONFIGURATION_UTILITY';
      PUSH pcu_utl_attr_p: [1 .. 4];
      pcu_utl_attr_p^ [1].key := clc$utility_command_search_mode;
      pcu_utl_attr_p^ [1].command_search_mode := clc$global_command_search;
      pcu_utl_attr_p^ [2].key := clc$utility_command_table;
      pcu_utl_attr_p^ [2].command_table := pcu_command_list;
      pcu_utl_attr_p^ [3].key := clc$utility_prompt;
      pcu_utl_attr_p^ [3].prompt.value := 'PCU';
      pcu_utl_attr_p^ [3].prompt.size := 3;
      pcu_utl_attr_p^ [4].key := clc$utility_termination_command;
      pcu_utl_attr_p^ [4].termination_command := 'QUIT';

      clp$begin_utility (edit_pcu_name, pcu_utl_attr_p^, status);
      IF NOT status.normal THEN
        EXIT /main_program/;
      IFEND;
      cmp$set_in_editor (TRUE);
      set_in_editor := TRUE;
      cmp$open_scratch_err_file (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      clp$scan_command_file (input_file.local_file_name, edit_pcu_name, 'PCU', local_status);
      IF cmv$pcu_error_count > 0 THEN
        IF error_file.local_file_name <> clc$null_file THEN
          cmp$generate_error_listing (error_file.local_file_name, local_status);
          clp$put_job_output ('-- WARNING -- Error(s) were encountered while processing input file.',
                local_status);
        IFEND;
      ELSEIF (NOT local_status.normal) AND (local_status.condition <> ame$file_not_known) THEN
        clp$put_job_output ('-- WARNING -- Error(s) were encountered while processing input file.', status);
        osp$generate_error_message (local_status, status);
      IFEND;
      cmp$clean_up_error_count;
      cmp$set_exec_in_editor (TRUE);
      set_executing_in_editor := TRUE;
      cmp$update_descriptor;
      clp$end_utility (edit_pcu_name, local_status);
      cmp$save_output (output_file.local_file_name, FALSE, status);
      IF NOT status.normal THEN
        EXIT /main_program/;
      IFEND;
      output_open := TRUE;
      IF input_file.local_file_name <> output_file.local_file_name THEN
        cmp$save_output (input_file.local_file_name, TRUE, status);
        IF NOT status.normal THEN
          EXIT /main_program/;
        IFEND;
        input_open := TRUE;
      IFEND;
      edit_pcu_name := 'PHYSICAL_CONFIGURATION_EDITOR';
      PUSH utility_attributes_p: [1 .. 5];
      utility_attributes_p^ [1].key := clc$utility_command_search_mode;
      utility_attributes_p^ [1].command_search_mode := clc$global_command_search;
      utility_attributes_p^ [2].key := clc$utility_command_table;
      utility_attributes_p^ [2].command_table := edit_pcu_command_list;
      utility_attributes_p^ [3].key := clc$utility_function_proc_table;
      utility_attributes_p^ [3].function_processor_table := edit_pcu_function_list;
      utility_attributes_p^ [4].key := clc$utility_prompt;
      utility_attributes_p^ [4].prompt.value := 'PCE';
      utility_attributes_p^ [4].prompt.size := 3;
      utility_attributes_p^ [5].key := clc$utility_termination_command;
      utility_attributes_p^ [5].termination_command := 'QUIT';

      clp$begin_utility (edit_pcu_name, utility_attributes_p^, status);
      IF NOT status.normal THEN
        EXIT /main_program/;
      IFEND;
      clp$scan_command_file (clc$current_command_input, edit_pcu_name, 'PCE', status);
      IF NOT status.normal THEN
        EXIT /main_program/;
      IFEND;

      clp$end_utility (edit_pcu_name, local_status);
    END /main_program/;
    IF NOT status.normal THEN
      cmp$close_utility_files;
      cmp$open_utility_files (local_status);
      IF input_open OR output_open THEN
        cmp$close_in_out_files;
      IFEND;
      IF set_executing_in_editor THEN
        cmp$clean_up_list;
        cmp$set_exec_in_editor (FALSE);
      IFEND;
      IF set_in_editor THEN
        cmp$set_in_editor (FALSE);
      IFEND;
    IFEND;
    osp$disestablish_cond_handler;

  PROCEND cmp$edit_pc;

?? OLDTITLE ??
?? NEWTITLE := '   cmp$install_phys_configuration', EJECT ??

{ PURPOSE :
{    This procedure is the command processor of the PCU subcommand
{    INSTALL_PHYSICAL_CONFIGURATION.

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


{ PROCEDURE (cmm$pcu_inspc) install_physical_configuration, inspc (
{   input, i: file = $local.physical_configuration
{   errors, error, e: file = $errors
{   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,
        default_value: string (29),
      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, 20, 31, 115],
    clc$command, 6, 3, 0, 0, 0, 0, 3, 'CMM$PCU_INSPC'], [
    ['E                              ',clc$abbreviation_entry, 2],
    ['ERROR                          ',clc$alias_entry, 2],
    ['ERRORS                         ',clc$nominal_entry, 2],
    ['I                              ',clc$abbreviation_entry, 1],
    ['INPUT                          ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 3]],
    [
{ 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, 3,
  clc$optional_default_parameter, 0, 29],
{ PARAMETER 2
    [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, 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$file_type],
    '$local.physical_configuration'],
{ PARAMETER 2
    [[1, 0, clc$file_type],
    '$errors'],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

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

    CONST
      p$input = 1,
      p$errors = 2,
      p$status = 3;

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

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    cmp$compile_phys_configuration ({VERIFY=} FALSE, ^pvt, status);

  PROCEND cmp$install_phys_configuration;

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

{ PURPOSE :
{    This procedure starts up the physical_configuration_utility.

  PROCEDURE [XDCL, #GATE] physical_configuration_utility
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);



{ PROCEDURE (cmm$pcu) physical_configuration_utility, pcu (
{   status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [88, 11, 10, 13, 20, 54, 683],
    clc$command, 1, 1, 0, 0, 0, 0, 1, 'CMM$PCU'], [
    ['STATUS                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [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$status_type]]];

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

    CONST
      p$status = 1;

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

    CONST
      utility_name = 'PHYSICAL_CONFIGURATION_UTILITY ';

    VAR
      local_status: ost$status,
      pcu_utl_attr_p: ^clt$utility_attributes;

  /main_program/
    BEGIN
      clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      PUSH pcu_utl_attr_p: [1 .. 4];
      pcu_utl_attr_p^ [1].key := clc$utility_command_search_mode;
      pcu_utl_attr_p^ [1].command_search_mode := clc$global_command_search;
      pcu_utl_attr_p^ [2].key := clc$utility_command_table;
      pcu_utl_attr_p^ [2].command_table := pcu_command_list;
      pcu_utl_attr_p^ [3].key := clc$utility_prompt;
      pcu_utl_attr_p^ [3].prompt.value := 'PCU';
      pcu_utl_attr_p^ [3].prompt.size := 3;
      pcu_utl_attr_p^ [4].key := clc$utility_termination_command;
      pcu_utl_attr_p^ [4].termination_command := 'QUIT';

      clp$begin_utility (utility_name, pcu_utl_attr_p^, status);
      IF NOT status.normal THEN
        EXIT /main_program/;
      IFEND;

      cmp$open_utility_files (status);
      IF NOT status.normal THEN
        EXIT /main_program/;
      IFEND;

      cmp$set_default_mainframe_name (status);
      IF NOT status.normal THEN
        EXIT /main_program/;
      IFEND;

      clp$scan_command_file (clc$current_command_input, utility_name, 'PCU', status);
      IF NOT status.normal THEN
        EXIT /main_program/;
      IFEND;

      clp$end_utility (utility_name, local_status);

    END /main_program/;

  PROCEND physical_configuration_utility;

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

{ PURPOSE :
{    This procedure is the command processor of the alias PCU

  PROCEDURE [XDCL, #GATE] pcu
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

    physical_configuration_utility (parameter_list, status);

  PROCEND pcu;


?? OLDTITLE ??
?? NEWTITLE := '   cmp$quit', EJECT ??

{ PURPOSE :
{    This procedure ends the physical_configuration_utility.

  PROCEDURE cmp$quit
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{   PROCEDURE (cmm$pcu_quit) quit, qui (
{       )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
    recend := [
    [1,
    [88, 11, 10, 13, 22, 50, 357],
    clc$command, 0, 0, 0, 0, 0, 0, 0, 'CMM$PCU_QUIT']];

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

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    clp$end_scan_command_file (utility_name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    cmp$close_utility_files;

  PROCEND cmp$quit;

?? OLDTITLE ??
?? NEWTITLE := '   cmp$verify_phys_configuration', EJECT ??

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

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


{ PROCEDURE (cmm$pcu_verpc) verify_physical_configuration, verpc (
{   mainframe, m: name = $name($mainframe(identifier))
{   input, i: file = $local.physical_configuration
{   errors, error, e: file = $errors
{   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,
        default_value: string (29),
      recend,
      type2: record
        header: clt$type_specification_header,
        default_value: string (29),
      recend,
      type3: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [88, 11, 10, 13, 21, 24, 501],
    clc$command, 8, 4, 0, 0, 0, 0, 4, 'CMM$PCU_VERPC'], [
    ['E                              ',clc$abbreviation_entry, 3],
    ['ERROR                          ',clc$alias_entry, 3],
    ['ERRORS                         ',clc$nominal_entry, 3],
    ['I                              ',clc$abbreviation_entry, 2],
    ['INPUT                          ',clc$nominal_entry, 2],
    ['M                              ',clc$abbreviation_entry, 1],
    ['MAINFRAME                      ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 4]],
    [
{ 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, 5,
  clc$optional_default_parameter, 0, 29],
{ 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, 29],
{ PARAMETER 3
    [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, 7],
{ 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],
    '$name($mainframe(identifier))'],
{ PARAMETER 2
    [[1, 0, clc$file_type],
    '$local.physical_configuration'],
{ PARAMETER 3
    [[1, 0, clc$file_type],
    '$errors'],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$mainframe = 1,
      p$input = 2,
      p$errors = 3,
      p$status = 4;

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

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    cmp$compile_phys_configuration ({VERIFY=} TRUE, ^pvt, status);

  PROCEND cmp$verify_phys_configuration;

?? OLDTITLE ??
?? OLDTITLE ??
MODEND cmm$phys_configuration_utl_2dd;

