?? LEFT := 1, RIGHT := 110 ??
?? TITLE := 'NOS/VE: Manage Network Applications Utility' ??
?? NEWTITLE := 'Global Declarations' ??
MODULE nam$manage_network_applications;
?? PUSH (LISTEXT := ON) ??
*copyc amt$file_byte_address
*copyc amt$file_identifier
*copyc amt$local_file_name
*copyc amv$nil_file_identifier
*copyc clc$page_widths
*copyc clc$standard_file_names
*copyc cle$ecc_command_processing
*copyc clt$command_line_index
*copyc clt$command_line_size
*copyc clt$file
*copyc clt$file_reference
*copyc cyt$string_size
*copyc ift$default_terminal_attributes
*copyc nac$application_catalog_layout
*copyc nac$sk_unnamed_tcp_application
*copyc nac$sk_unnamed_udp_application
*copyc nae$application_interfaces
*copyc nae$manage_network_applications
*copyc nat$application_name
*copyc nat$application_status
*copyc nat$client_attributes
*copyc nat$internet_sap_identifier
*copyc nat$protocol
*copyc nat$server_attributes
*copyc ost$date
*copyc ost$status
*copyc ost$status_message
*copyc ost$string
*copyc ost$time
*copyc pmt$condition
*copyc pmt$condition_information
*copyc pmt$os_name
?? POP ??
*copyc amp$fetch
*copyc amp$get_next
*copyc amp$put_next
*copyc amp$put_partial
*copyc avp$get_capability
*copyc clp$begin_utility
*copyc clp$convert_integer_to_string
*copyc clp$convert_string_to_file
*copyc clp$close_display
*copyc clp$end_include
*copyc clp$end_utility
*copyc clp$evaluate_parameters
*copyc clp$get_command_origin
*copyc clp$get_line_from_command_file
*copyc clp$get_path_description
*copyc clp$include_file
*copyc clp$new_display_line
*copyc clp$open_display
*copyc clp$open_display_file
*copyc clp$open_display_reference
*copyc clp$pop_input
*copyc clp$push_input
*copyc clp$put_display
*copyc clp$reset_for_next_display_page
*copyc clp$test_parameter
*copyc clp$trimmed_string_size
*copyc clv$nil_block_handle
*copyc clv$nil_display_control
*copyc fsp$close_file
*copyc fsp$open_file
*copyc ifp$discard_suspended_output
*copyc i#move
*copyc nap$applications_installed
*copyc nap$attach_application_file
*copyc nap$activate_client
*copyc nap$activate_server
*copyc nap$activate_tcpip
*copyc nap$change_client
*copyc nap$change_server
*copyc nap$change_tcpip
*copyc nap$close_server_job_file
*copyc nap$deactivate_client
*copyc nap$deactivate_server
*copyc nap$deactivate_tcpip
*copyc nap$define_client
*copyc nap$define_server
*copyc nap$define_tcpip
*copyc nap$delete_client
*copyc nap$delete_server
*copyc nap$delete_tcpip
*copyc nap$detach_application_file
*copyc nap$get_application_names
*copyc nap$get_client_attributes
*copyc nap$get_client_status
*copyc nap$get_server_attributes
*copyc nap$get_server_status
*copyc nap$get_tcpip_attributes
*copyc nap$get_tcpip_status
*copyc nap$open_server_job_file
*copyc nap$verify_application_id
*copyc nap$verify_application_name
*copyc nap$verify_tcpip_name
*copyc osp$append_status_integer
*copyc osp$append_status_parameter
*copyc osp$format_message
*copyc osp$set_status_abnormal
*copyc osp$set_status_condition
*copyc pfp$convert_pf_path_to_fs_path
*copyc pmp$disestablish_cond_handler
*copyc pmp$establish_condition_handler
*copyc pmp$get_unique_name
*copyc pmp$get_legible_date_time
*copyc pmp$get_os_version
*copyc rmp$get_device_class
?? EJECT ??

  CONST
    nac$network_administrator_vers = 'V1.2',
    nac$network_administrator_level = '88230',
    nac$default_ring = 13,
    all_keyword = 'ALL',
    display_spacer = 35,
    default_output_file = '$OUTPUT',
    prompt_string = 'MNA',
    change_server_prompt_string = 'chas',
    change_client_prompt_string = 'chac',
    change_tcpip_prompt_string = 'chat',
    define_server_prompt_string = 'defs',
    define_client_prompt_string = 'defc',
    define_tcpip_prompt_string = 'deft';


  CONST
    continuation_increment = 6,
    continuation_indicator_size = 2,
    indent_increment = 2;

  VAR
    current_indent_column: clt$command_line_index,
    initial_indent_column: clt$command_line_index := 1;

{ table change_client_commands
{ command (change_maximum_connections, chamc) processor =   change_maximum_connections
{ command (change_connection_priority, chacp) processor =   change_connection_priority
{ command (change_client_validation, chacv) processor =   change_client_validation
{ command (change_application_identifier, chaai) processor =   change_application_identifier
{ command (display_client_attributes, display_client_attribute, disca)   processor = ..
{   sub_display_client_attributes
{ command (generate_client_definition, gencd) processor =   sub_generate_client_definition
{ command (end_change_client, quit, qui, endcc) processor = end_change_client

?? PUSH (LISTEXT := ON) ??

  VAR
    change_client_commands: [STATIC, READ] ^clt$command_table := ^change_client_commands_entries,

    change_client_commands_entries: [STATIC, READ] array [1 .. 17] of clt$command_table_entry := [
          {} ['CHAAI                          ', clc$abbreviation_entry, clc$advertised_entry, 4,
          clc$automatically_log, clc$linked_call, ^change_application_identifier],
          {} ['CHACP                          ', clc$abbreviation_entry, clc$advertised_entry, 2,
          clc$automatically_log, clc$linked_call, ^change_connection_priority],
          {} ['CHACV                          ', clc$abbreviation_entry, clc$advertised_entry, 3,
          clc$automatically_log, clc$linked_call, ^change_client_validation],
          {} ['CHAMC                          ', clc$abbreviation_entry, clc$advertised_entry, 1,
          clc$automatically_log, clc$linked_call, ^change_maximum_connections],
          {} ['CHANGE_APPLICATION_IDENTIFIER  ', clc$nominal_entry, clc$advertised_entry, 4,
          clc$automatically_log, clc$linked_call, ^change_application_identifier],
          {} ['CHANGE_CLIENT_VALIDATION       ', clc$nominal_entry, clc$advertised_entry, 3,
          clc$automatically_log, clc$linked_call, ^change_client_validation],
          {} ['CHANGE_CONNECTION_PRIORITY     ', clc$nominal_entry, clc$advertised_entry, 2,
          clc$automatically_log, clc$linked_call, ^change_connection_priority],
          {} ['CHANGE_MAXIMUM_CONNECTIONS     ', clc$nominal_entry, clc$advertised_entry, 1,
          clc$automatically_log, clc$linked_call, ^change_maximum_connections],
          {} ['DISCA                          ', clc$abbreviation_entry, clc$advertised_entry, 5,
          clc$automatically_log, clc$linked_call, ^sub_display_client_attributes],
          {} ['DISPLAY_CLIENT_ATTRIBUTE       ', clc$alias_entry, clc$advertised_entry, 5,
          clc$automatically_log, clc$linked_call, ^sub_display_client_attributes],
          {} ['DISPLAY_CLIENT_ATTRIBUTES      ', clc$nominal_entry, clc$advertised_entry, 5,
          clc$automatically_log, clc$linked_call, ^sub_display_client_attributes],
          {} ['ENDCC                          ', clc$abbreviation_entry, clc$advertised_entry, 7,
          clc$automatically_log, clc$linked_call, ^end_change_client],
          {} ['END_CHANGE_CLIENT              ', clc$nominal_entry, clc$advertised_entry, 7,
          clc$automatically_log, clc$linked_call, ^end_change_client],
          {} ['GENCD                          ', clc$abbreviation_entry, clc$advertised_entry, 6,
          clc$automatically_log, clc$linked_call, ^sub_generate_client_definition],
          {} ['GENERATE_CLIENT_DEFINITION     ', clc$nominal_entry, clc$advertised_entry, 6,
          clc$automatically_log, clc$linked_call, ^sub_generate_client_definition],
          {} ['QUI                            ', clc$alias_entry, clc$advertised_entry, 7,
          clc$automatically_log, clc$linked_call, ^end_change_client],
          {} ['QUIT                           ', clc$alias_entry, clc$advertised_entry, 7,
          clc$automatically_log, clc$linked_call, ^end_change_client]];

?? POP ??


{ table change_server_commands
{ command (add_server_managed_titles, add_server_managed_title, addsmt)   processor = ..
{   add_server_managed_titles
{ command (add_titles, add_title, addt) processor = add_titles
{ command (delete_server_managed_titles, delete_server_managed_title,   delsmt) processor = ..
{   delete_server_managed_titles
{ command (delete_titles, delete_title, delt) processor = delete_titles
{ command (change_server_validation, chasv) processor =   change_server_validation
{ command (change_server_job, chasj) processor = change_server_job
{ command (change_application_identifier, chaai) processor =   change_application_identifier
{ command (change_maximum_connections, chamc) processor =   change_maximum_connections
{ command (change_connection_priority, chacp) processor =   change_connection_priority
{ command (change_accept_connection, chaac) processor =   change_accept_connection
{ command (change_client_validation, chacv) processor =   change_client_server_validation
{ command (change_client_info_source, chacis) processor =   change_client_info_source
{ command (add_client_address, addca) processor = add_client_address
{ command (delete_client_address, delca) processor = delete_client_address
{ command (display_server_attributes, display_server_attribute, dissa)   processor = ..
{   sub_display_server_attributes
{ command (generate_server_definition, gensd) processor =   sub_generate_server_definition
{ command (end_change_server, quit, qui, endcs) processor = end_change_server

?? PUSH (LISTEXT := ON) ??

  VAR
    change_server_commands: [STATIC, READ] ^clt$command_table := ^change_server_commands_entries,

    change_server_commands_entries: [STATIC, READ] array [1 .. 41] of clt$command_table_entry := [
          {} ['ADDCA                          ', clc$abbreviation_entry, clc$advertised_entry, 13,
          clc$automatically_log, clc$linked_call, ^add_client_address],
          {} ['ADDSMT                         ', clc$abbreviation_entry, clc$advertised_entry, 1,
          clc$automatically_log, clc$linked_call, ^add_server_managed_titles],
          {} ['ADDT                           ', clc$abbreviation_entry, clc$advertised_entry, 2,
          clc$automatically_log, clc$linked_call, ^add_titles],
          {} ['ADD_CLIENT_ADDRESS             ', clc$nominal_entry, clc$advertised_entry, 13,
          clc$automatically_log, clc$linked_call, ^add_client_address],
          {} ['ADD_SERVER_MANAGED_TITLE       ', clc$alias_entry, clc$advertised_entry, 1,
          clc$automatically_log, clc$linked_call, ^add_server_managed_titles],
          {} ['ADD_SERVER_MANAGED_TITLES      ', clc$nominal_entry, clc$advertised_entry, 1,
          clc$automatically_log, clc$linked_call, ^add_server_managed_titles],
          {} ['ADD_TITLE                      ', clc$alias_entry, clc$advertised_entry, 2,
          clc$automatically_log, clc$linked_call, ^add_titles],
          {} ['ADD_TITLES                     ', clc$nominal_entry, clc$advertised_entry, 2,
          clc$automatically_log, clc$linked_call, ^add_titles],
          {} ['CHAAC                          ', clc$abbreviation_entry, clc$advertised_entry, 10,
          clc$automatically_log, clc$linked_call, ^change_accept_connection],
          {} ['CHAAI                          ', clc$abbreviation_entry, clc$advertised_entry, 7,
          clc$automatically_log, clc$linked_call, ^change_application_identifier],
          {} ['CHACIS                         ', clc$abbreviation_entry, clc$advertised_entry, 12,
          clc$automatically_log, clc$linked_call, ^change_client_info_source],
          {} ['CHACP                          ', clc$abbreviation_entry, clc$advertised_entry, 9,
          clc$automatically_log, clc$linked_call, ^change_connection_priority],
          {} ['CHACV                          ', clc$abbreviation_entry, clc$advertised_entry, 11,
          clc$automatically_log, clc$linked_call, ^change_client_server_validation],
          {} ['CHAMC                          ', clc$abbreviation_entry, clc$advertised_entry, 8,
          clc$automatically_log, clc$linked_call, ^change_maximum_connections],
          {} ['CHANGE_ACCEPT_CONNECTION       ', clc$nominal_entry, clc$advertised_entry, 10,
          clc$automatically_log, clc$linked_call, ^change_accept_connection],
          {} ['CHANGE_APPLICATION_IDENTIFIER  ', clc$nominal_entry, clc$advertised_entry, 7,
          clc$automatically_log, clc$linked_call, ^change_application_identifier],
          {} ['CHANGE_CLIENT_INFO_SOURCE      ', clc$nominal_entry, clc$advertised_entry, 12,
          clc$automatically_log, clc$linked_call, ^change_client_info_source],
          {} ['CHANGE_CLIENT_VALIDATION       ', clc$nominal_entry, clc$advertised_entry, 11,
          clc$automatically_log, clc$linked_call, ^change_client_server_validation],
          {} ['CHANGE_CONNECTION_PRIORITY     ', clc$nominal_entry, clc$advertised_entry, 9,
          clc$automatically_log, clc$linked_call, ^change_connection_priority],
          {} ['CHANGE_MAXIMUM_CONNECTIONS     ', clc$nominal_entry, clc$advertised_entry, 8,
          clc$automatically_log, clc$linked_call, ^change_maximum_connections],
          {} ['CHANGE_SERVER_JOB              ', clc$nominal_entry, clc$advertised_entry, 6,
          clc$automatically_log, clc$linked_call, ^change_server_job],
          {} ['CHANGE_SERVER_VALIDATION       ', clc$nominal_entry, clc$advertised_entry, 5,
          clc$automatically_log, clc$linked_call, ^change_server_validation],
          {} ['CHASJ                          ', clc$abbreviation_entry, clc$advertised_entry, 6,
          clc$automatically_log, clc$linked_call, ^change_server_job],
          {} ['CHASV                          ', clc$abbreviation_entry, clc$advertised_entry, 5,
          clc$automatically_log, clc$linked_call, ^change_server_validation],
          {} ['DELCA                          ', clc$abbreviation_entry, clc$advertised_entry, 14,
          clc$automatically_log, clc$linked_call, ^delete_client_address],
          {} ['DELETE_CLIENT_ADDRESS          ', clc$nominal_entry, clc$advertised_entry, 14,
          clc$automatically_log, clc$linked_call, ^delete_client_address],
          {} ['DELETE_SERVER_MANAGED_TITLE    ', clc$alias_entry, clc$advertised_entry, 3,
          clc$automatically_log, clc$linked_call, ^delete_server_managed_titles],
          {} ['DELETE_SERVER_MANAGED_TITLES   ', clc$nominal_entry, clc$advertised_entry, 3,
          clc$automatically_log, clc$linked_call, ^delete_server_managed_titles],
          {} ['DELETE_TITLE                   ', clc$alias_entry, clc$advertised_entry, 4,
          clc$automatically_log, clc$linked_call, ^delete_titles],
          {} ['DELETE_TITLES                  ', clc$nominal_entry, clc$advertised_entry, 4,
          clc$automatically_log, clc$linked_call, ^delete_titles],
          {} ['DELSMT                         ', clc$abbreviation_entry, clc$advertised_entry, 3,
          clc$automatically_log, clc$linked_call, ^delete_server_managed_titles],
          {} ['DELT                           ', clc$abbreviation_entry, clc$advertised_entry, 4,
          clc$automatically_log, clc$linked_call, ^delete_titles],
          {} ['DISPLAY_SERVER_ATTRIBUTE       ', clc$alias_entry, clc$advertised_entry, 15,
          clc$automatically_log, clc$linked_call, ^sub_display_server_attributes],
          {} ['DISPLAY_SERVER_ATTRIBUTES      ', clc$nominal_entry, clc$advertised_entry, 15,
          clc$automatically_log, clc$linked_call, ^sub_display_server_attributes],
          {} ['DISSA                          ', clc$abbreviation_entry, clc$advertised_entry, 15,
          clc$automatically_log, clc$linked_call, ^sub_display_server_attributes],
          {} ['ENDCS                          ', clc$abbreviation_entry, clc$advertised_entry, 17,
          clc$automatically_log, clc$linked_call, ^end_change_server],
          {} ['END_CHANGE_SERVER              ', clc$nominal_entry, clc$advertised_entry, 17,
          clc$automatically_log, clc$linked_call, ^end_change_server],
          {} ['GENERATE_SERVER_DEFINITION     ', clc$nominal_entry, clc$advertised_entry, 16,
          clc$automatically_log, clc$linked_call, ^sub_generate_server_definition],
          {} ['GENSD                          ', clc$abbreviation_entry, clc$advertised_entry, 16,
          clc$automatically_log, clc$linked_call, ^sub_generate_server_definition],
          {} ['QUI                            ', clc$alias_entry, clc$advertised_entry, 17,
          clc$automatically_log, clc$linked_call, ^end_change_server],
          {} ['QUIT                           ', clc$alias_entry, clc$advertised_entry, 17,
          clc$automatically_log, clc$linked_call, ^end_change_server]];

?? POP ??

{ table change_tcpip_commands
{ command (change_maximum_sockets, chams) processor =        change_maximum_sockets
{ command (change_tcpip_validation, chatv) processor =       change_tcpip_validation
{ command (display_tcpip_attributes, dista) processor =      sub_display_tcpip_attributes
{ command (generate_tcpip_definition, gentd) processor =     sub_generate_tcpip_definition
{ command (end_change_tcpip_application, endcta, quit, qui) processor = end_change_tcpip_application

?? PUSH (LISTEXT := ON) ??

  VAR
    change_tcpip_commands: [STATIC, READ] ^clt$command_table := ^change_tcpip_commands_entries,

    change_tcpip_commands_entries: [STATIC, READ] array [1 .. 12] of clt$command_table_entry := [
          {} ['CHAMS                          ', clc$abbreviation_entry, clc$normal_usage_entry, 1,
          clc$automatically_log, clc$linked_call, ^change_maximum_sockets],
          {} ['CHANGE_MAXIMUM_SOCKETS         ', clc$nominal_entry, clc$normal_usage_entry, 1,
          clc$automatically_log, clc$linked_call, ^change_maximum_sockets],
          {} ['CHANGE_TCPIP_VALIDATION        ', clc$nominal_entry, clc$normal_usage_entry, 2,
          clc$automatically_log, clc$linked_call, ^change_tcpip_validation],
          {} ['CHATV                          ', clc$abbreviation_entry, clc$normal_usage_entry, 2,
          clc$automatically_log, clc$linked_call, ^change_tcpip_validation],
          {} ['DISPLAY_TCPIP_ATTRIBUTES       ', clc$nominal_entry, clc$normal_usage_entry, 3,
          clc$automatically_log, clc$linked_call, ^sub_display_tcpip_attributes],
          {} ['DISTA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 3,
          clc$automatically_log, clc$linked_call, ^sub_display_tcpip_attributes],
          {} ['ENDCTA                         ', clc$alias_entry, clc$normal_usage_entry, 5,
          clc$automatically_log, clc$linked_call, ^end_change_tcpip_application],
          {} ['END_CHANGE_TCPIP_APPLICATION   ', clc$nominal_entry, clc$normal_usage_entry, 5,
          clc$automatically_log, clc$linked_call, ^end_change_tcpip_application],
          {} ['GENERATE_TCPIP_DEFINITION      ', clc$nominal_entry, clc$normal_usage_entry, 4,
          clc$automatically_log, clc$linked_call, ^sub_generate_tcpip_definition],
          {} ['GENTD                          ', clc$abbreviation_entry, clc$normal_usage_entry, 4,
          clc$automatically_log, clc$linked_call, ^sub_generate_tcpip_definition],
          {} ['QUI                            ', clc$abbreviation_entry, clc$normal_usage_entry, 5,
          clc$automatically_log, clc$linked_call, ^end_change_tcpip_application],
          {} ['QUIT                           ', clc$alias_entry, clc$normal_usage_entry, 5,
          clc$automatically_log, clc$linked_call, ^end_change_tcpip_application]];

?? POP ??

{ table define_client_commands
{ command (change_maximum_connections, chamc) processor = change_maximum_connections
{ command (change_connection_priority, chacp) processor = change_connection_priority
{ command (change_client_validation, chacv) processor = change_client_validation
{ command (change_application_identifier, chaai) processor = change_application_identifier
{ command (display_client_attributes, display_client_attribute, disca) processor =         ..
{   sub_display_client_attributes
{ command (generate_client_definition, gencd) processor = sub_generate_client_definition
{ command (end_define_client, quit, qui, enddc) processor = end_define_client

?? PUSH (LISTEXT := ON) ??

  VAR
    define_client_commands: [STATIC, READ] ^clt$command_table := ^define_client_commands_entries,

    define_client_commands_entries: [STATIC, READ] array [1 .. 17] of clt$command_table_entry := [
          {} ['CHAAI                          ', clc$abbreviation_entry, clc$advertised_entry, 4,
          clc$automatically_log, clc$linked_call, ^change_application_identifier],
          {} ['CHACP                          ', clc$abbreviation_entry, clc$advertised_entry, 2,
          clc$automatically_log, clc$linked_call, ^change_connection_priority],
          {} ['CHACV                          ', clc$abbreviation_entry, clc$advertised_entry, 3,
          clc$automatically_log, clc$linked_call, ^change_client_validation],
          {} ['CHAMC                          ', clc$abbreviation_entry, clc$advertised_entry, 1,
          clc$automatically_log, clc$linked_call, ^change_maximum_connections],
          {} ['CHANGE_APPLICATION_IDENTIFIER  ', clc$nominal_entry, clc$advertised_entry, 4,
          clc$automatically_log, clc$linked_call, ^change_application_identifier],
          {} ['CHANGE_CLIENT_VALIDATION       ', clc$nominal_entry, clc$advertised_entry, 3,
          clc$automatically_log, clc$linked_call, ^change_client_validation],
          {} ['CHANGE_CONNECTION_PRIORITY     ', clc$nominal_entry, clc$advertised_entry, 2,
          clc$automatically_log, clc$linked_call, ^change_connection_priority],
          {} ['CHANGE_MAXIMUM_CONNECTIONS     ', clc$nominal_entry, clc$advertised_entry, 1,
          clc$automatically_log, clc$linked_call, ^change_maximum_connections],
          {} ['DISCA                          ', clc$abbreviation_entry, clc$advertised_entry, 5,
          clc$automatically_log, clc$linked_call, ^sub_display_client_attributes],
          {} ['DISPLAY_CLIENT_ATTRIBUTE       ', clc$alias_entry, clc$advertised_entry, 5,
          clc$automatically_log, clc$linked_call, ^sub_display_client_attributes],
          {} ['DISPLAY_CLIENT_ATTRIBUTES      ', clc$nominal_entry, clc$advertised_entry, 5,
          clc$automatically_log, clc$linked_call, ^sub_display_client_attributes],
          {} ['ENDDC                          ', clc$abbreviation_entry, clc$advertised_entry, 7,
          clc$automatically_log, clc$linked_call, ^end_define_client],
          {} ['END_DEFINE_CLIENT              ', clc$nominal_entry, clc$advertised_entry, 7,
          clc$automatically_log, clc$linked_call, ^end_define_client],
          {} ['GENCD                          ', clc$abbreviation_entry, clc$advertised_entry, 6,
          clc$automatically_log, clc$linked_call, ^sub_generate_client_definition],
          {} ['GENERATE_CLIENT_DEFINITION     ', clc$nominal_entry, clc$advertised_entry, 6,
          clc$automatically_log, clc$linked_call, ^sub_generate_client_definition],
          {} ['QUI                            ', clc$alias_entry, clc$advertised_entry, 7,
          clc$automatically_log, clc$linked_call, ^end_define_client],
          {} ['QUIT                           ', clc$alias_entry, clc$advertised_entry, 7,
          clc$automatically_log, clc$linked_call, ^end_define_client]];

?? POP ??

{ table define_server_commands
{ command (add_server_managed_titles, add_server_managed_title, addsmt) processor =         ..
{   add_server_managed_titles
{ command (add_titles, add_title, addt) processor = add_titles
{ command (delete_server_managed_titles, delete_server_managed_title, delsmt) processor =         ..
{   delete_server_managed_titles
{ command (delete_titles, delete_title, delt) processor = delete_titles
{ command (change_server_validation, chasv) processor = change_server_validation
{ command (change_server_job, chasj) processor = change_server_job
{ command (change_application_identifier, chaai) processor = change_application_identifier
{ command (change_maximum_connections, chamc) processor = change_maximum_connections
{ command (change_connection_priority, chacp) processor = change_connection_priority
{ command (change_accept_connection, chaac) processor = change_accept_connection
{ command (change_client_validation, chacv) processor = change_client_server_validation
{ command (change_client_info_source, chacis) processor = change_client_info_source
{ command (add_client_address, addca) processor = add_client_address
{ command (delete_client_address, delca) processor = delete_client_address
{ command (display_server_attributes, display_server_attribute, dissa) processor =             ..
{   sub_display_server_attributes
{ command (generate_server_definition, gensd) processor = sub_generate_server_definition
{ command (end_define_server, quit, qui, endds) processor = end_define_server

?? PUSH (LISTEXT := ON) ??

  VAR
    define_server_commands: [STATIC, READ] ^clt$command_table := ^define_server_commands_entries,

    define_server_commands_entries: [STATIC, READ] array [1 .. 41] of clt$command_table_entry := [
          {} ['ADDCA                          ', clc$abbreviation_entry, clc$advertised_entry, 13,
          clc$automatically_log, clc$linked_call, ^add_client_address],
          {} ['ADDSMT                         ', clc$abbreviation_entry, clc$advertised_entry, 1,
          clc$automatically_log, clc$linked_call, ^add_server_managed_titles],
          {} ['ADDT                           ', clc$abbreviation_entry, clc$advertised_entry, 2,
          clc$automatically_log, clc$linked_call, ^add_titles],
          {} ['ADD_CLIENT_ADDRESS             ', clc$nominal_entry, clc$advertised_entry, 13,
          clc$automatically_log, clc$linked_call, ^add_client_address],
          {} ['ADD_SERVER_MANAGED_TITLE       ', clc$alias_entry, clc$advertised_entry, 1,
          clc$automatically_log, clc$linked_call, ^add_server_managed_titles],
          {} ['ADD_SERVER_MANAGED_TITLES      ', clc$nominal_entry, clc$advertised_entry, 1,
          clc$automatically_log, clc$linked_call, ^add_server_managed_titles],
          {} ['ADD_TITLE                      ', clc$alias_entry, clc$advertised_entry, 2,
          clc$automatically_log, clc$linked_call, ^add_titles],
          {} ['ADD_TITLES                     ', clc$nominal_entry, clc$advertised_entry, 2,
          clc$automatically_log, clc$linked_call, ^add_titles],
          {} ['CHAAC                          ', clc$abbreviation_entry, clc$advertised_entry, 10,
          clc$automatically_log, clc$linked_call, ^change_accept_connection],
          {} ['CHAAI                          ', clc$abbreviation_entry, clc$advertised_entry, 7,
          clc$automatically_log, clc$linked_call, ^change_application_identifier],
          {} ['CHACIS                         ', clc$abbreviation_entry, clc$advertised_entry, 12,
          clc$automatically_log, clc$linked_call, ^change_client_info_source],
          {} ['CHACP                          ', clc$abbreviation_entry, clc$advertised_entry, 9,
          clc$automatically_log, clc$linked_call, ^change_connection_priority],
          {} ['CHACV                          ', clc$abbreviation_entry, clc$advertised_entry, 11,
          clc$automatically_log, clc$linked_call, ^change_client_server_validation],
          {} ['CHAMC                          ', clc$abbreviation_entry, clc$advertised_entry, 8,
          clc$automatically_log, clc$linked_call, ^change_maximum_connections],
          {} ['CHANGE_ACCEPT_CONNECTION       ', clc$nominal_entry, clc$advertised_entry, 10,
          clc$automatically_log, clc$linked_call, ^change_accept_connection],
          {} ['CHANGE_APPLICATION_IDENTIFIER  ', clc$nominal_entry, clc$advertised_entry, 7,
          clc$automatically_log, clc$linked_call, ^change_application_identifier],
          {} ['CHANGE_CLIENT_INFO_SOURCE      ', clc$nominal_entry, clc$advertised_entry, 12,
          clc$automatically_log, clc$linked_call, ^change_client_info_source],
          {} ['CHANGE_CLIENT_VALIDATION       ', clc$nominal_entry, clc$advertised_entry, 11,
          clc$automatically_log, clc$linked_call, ^change_client_server_validation],
          {} ['CHANGE_CONNECTION_PRIORITY     ', clc$nominal_entry, clc$advertised_entry, 9,
          clc$automatically_log, clc$linked_call, ^change_connection_priority],
          {} ['CHANGE_MAXIMUM_CONNECTIONS     ', clc$nominal_entry, clc$advertised_entry, 8,
          clc$automatically_log, clc$linked_call, ^change_maximum_connections],
          {} ['CHANGE_SERVER_JOB              ', clc$nominal_entry, clc$advertised_entry, 6,
          clc$automatically_log, clc$linked_call, ^change_server_job],
          {} ['CHANGE_SERVER_VALIDATION       ', clc$nominal_entry, clc$advertised_entry, 5,
          clc$automatically_log, clc$linked_call, ^change_server_validation],
          {} ['CHASJ                          ', clc$abbreviation_entry, clc$advertised_entry, 6,
          clc$automatically_log, clc$linked_call, ^change_server_job],
          {} ['CHASV                          ', clc$abbreviation_entry, clc$advertised_entry, 5,
          clc$automatically_log, clc$linked_call, ^change_server_validation],
          {} ['DELCA                          ', clc$abbreviation_entry, clc$advertised_entry, 14,
          clc$automatically_log, clc$linked_call, ^delete_client_address],
          {} ['DELETE_CLIENT_ADDRESS          ', clc$nominal_entry, clc$advertised_entry, 14,
          clc$automatically_log, clc$linked_call, ^delete_client_address],
          {} ['DELETE_SERVER_MANAGED_TITLE    ', clc$alias_entry, clc$advertised_entry, 3,
          clc$automatically_log, clc$linked_call, ^delete_server_managed_titles],
          {} ['DELETE_SERVER_MANAGED_TITLES   ', clc$nominal_entry, clc$advertised_entry, 3,
          clc$automatically_log, clc$linked_call, ^delete_server_managed_titles],
          {} ['DELETE_TITLE                   ', clc$alias_entry, clc$advertised_entry, 4,
          clc$automatically_log, clc$linked_call, ^delete_titles],
          {} ['DELETE_TITLES                  ', clc$nominal_entry, clc$advertised_entry, 4,
          clc$automatically_log, clc$linked_call, ^delete_titles],
          {} ['DELSMT                         ', clc$abbreviation_entry, clc$advertised_entry, 3,
          clc$automatically_log, clc$linked_call, ^delete_server_managed_titles],
          {} ['DELT                           ', clc$abbreviation_entry, clc$advertised_entry, 4,
          clc$automatically_log, clc$linked_call, ^delete_titles],
          {} ['DISPLAY_SERVER_ATTRIBUTE       ', clc$alias_entry, clc$advertised_entry, 15,
          clc$automatically_log, clc$linked_call, ^sub_display_server_attributes],
          {} ['DISPLAY_SERVER_ATTRIBUTES      ', clc$nominal_entry, clc$advertised_entry, 15,
          clc$automatically_log, clc$linked_call, ^sub_display_server_attributes],
          {} ['DISSA                          ', clc$abbreviation_entry, clc$advertised_entry, 15,
          clc$automatically_log, clc$linked_call, ^sub_display_server_attributes],
          {} ['ENDDS                          ', clc$abbreviation_entry, clc$advertised_entry, 17,
          clc$automatically_log, clc$linked_call, ^end_define_server],
          {} ['END_DEFINE_SERVER              ', clc$nominal_entry, clc$advertised_entry, 17,
          clc$automatically_log, clc$linked_call, ^end_define_server],
          {} ['GENERATE_SERVER_DEFINITION     ', clc$nominal_entry, clc$advertised_entry, 16,
          clc$automatically_log, clc$linked_call, ^sub_generate_server_definition],
          {} ['GENSD                          ', clc$abbreviation_entry, clc$advertised_entry, 16,
          clc$automatically_log, clc$linked_call, ^sub_generate_server_definition],
          {} ['QUI                            ', clc$alias_entry, clc$advertised_entry, 17,
          clc$automatically_log, clc$linked_call, ^end_define_server],
          {} ['QUIT                           ', clc$alias_entry, clc$advertised_entry, 17,
          clc$automatically_log, clc$linked_call, ^end_define_server]];

?? POP ??


{ table define_tcpip_commands
{ command (change_maximum_sockets, chams) processor =        change_maximum_sockets
{ command (change_tcpip_validation, chatv) processor =       change_tcpip_validation
{ command (display_tcpip_attributes, dista) processor =      sub_display_tcpip_attributes
{ command (generate_tcpip_definition, gentd) processor =     sub_generate_tcpip_definition
{ command (end_define_tcpip_application, enddta, quit, qui) processor = end_define_tcpip_application

?? PUSH (LISTEXT := ON) ??

  VAR
    define_tcpip_commands: [STATIC, READ] ^clt$command_table := ^define_tcpip_commands_entries,

    define_tcpip_commands_entries: [STATIC, READ] array [1 .. 12] of clt$command_table_entry := [
          {} ['CHAMS                          ', clc$abbreviation_entry, clc$normal_usage_entry, 1,
          clc$automatically_log, clc$linked_call, ^change_maximum_sockets],
          {} ['CHANGE_MAXIMUM_SOCKETS         ', clc$nominal_entry, clc$normal_usage_entry, 1,
          clc$automatically_log, clc$linked_call, ^change_maximum_sockets],
          {} ['CHANGE_TCPIP_VALIDATION        ', clc$nominal_entry, clc$normal_usage_entry, 2,
          clc$automatically_log, clc$linked_call, ^change_tcpip_validation],
          {} ['CHATV                          ', clc$abbreviation_entry, clc$normal_usage_entry, 2,
          clc$automatically_log, clc$linked_call, ^change_tcpip_validation],
          {} ['DISPLAY_TCPIP_ATTRIBUTES       ', clc$nominal_entry, clc$normal_usage_entry, 3,
          clc$automatically_log, clc$linked_call, ^sub_display_tcpip_attributes],
          {} ['DISTA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 3,
          clc$automatically_log, clc$linked_call, ^sub_display_tcpip_attributes],
          {} ['ENDDTA                         ', clc$alias_entry, clc$normal_usage_entry, 5,
          clc$automatically_log, clc$linked_call, ^end_define_tcpip_application],
          {} ['END_DEFINE_TCPIP_APPLICATION   ', clc$nominal_entry, clc$normal_usage_entry, 5,
          clc$automatically_log, clc$linked_call, ^end_define_tcpip_application],
          {} ['GENERATE_TCPIP_DEFINITION      ', clc$nominal_entry, clc$normal_usage_entry, 4,
          clc$automatically_log, clc$linked_call, ^sub_generate_tcpip_definition],
          {} ['GENTD                          ', clc$abbreviation_entry, clc$normal_usage_entry, 4,
          clc$automatically_log, clc$linked_call, ^sub_generate_tcpip_definition],
          {} ['QUI                            ', clc$abbreviation_entry, clc$normal_usage_entry, 5,
          clc$automatically_log, clc$linked_call, ^end_define_tcpip_application],
          {} ['QUIT                           ', clc$alias_entry, clc$normal_usage_entry, 5,
          clc$automatically_log, clc$linked_call, ^end_define_tcpip_application]];

?? POP ??



  CONST
    max_line_width = 300;

  TYPE
    line_space = record
      size: 0 .. max_line_width,
      value: string (max_line_width),
    recend;

  TYPE
    server_attributes = (sa$protocol, sa$nam_initiated, sa$titles, sa$title_attributes,
          sa$server_managed_titles, sa$application_id, sa$connection_priority, sa$max_connections,
          sa$server_capability, sa$server_ring, sa$server_system_priv, sa$server_job,
          sa$server_job_val_source, sa$server_job_max_connections, sa$accept_connections,
          sa$client_validation, sa$client_addresses, sa$client_info_source, sa$status),
    server_attribute_set = set of server_attributes,
    client_attributes = (ca$protocol, ca$application_id, ca$connection_priority, ca$max_connections,
          ca$client_capability, ca$client_ring, ca$client_system_priv, ca$status),
    client_attribute_set = set of client_attributes,
    tcpip_attributes = (ta$protocol, ta$maximum_sockets, ta$capability, ta$ring, ta$system_privilege),
    tcpip_attribute_set = set of tcpip_attributes,
    type_of_applications = set of nat$application_type,
    utility_states = (utility_idle, defining_server, defining_client, defining_tcpip, changing_server,
          changing_client, changing_tcpip);

  VAR
    application_status_description: array [nat$application_status] of string (8) := ['inactive', 'active'],
    boolean_label: [STATIC, READ] array [boolean] of string (5) := ['FALSE', 'TRUE'],
    change_server_utility_name: ost$name := 'CHANGE_SERVER',
    change_client_utility_name: ost$name := 'CHANGE_CLIENT',
    change_tcpip_utility_name: ost$name := 'CHANGE_TCPIP',
    client_info_label: array [nat$client_info_source] of string (22) := ['dialog', 'connection_data',
          'dialog connection_data'],
    client_system_kind: array [nat$client_system_kind] of string (6) := ['nosve', 'cdcnet', 'all'],
    command_file: string (8) := '$COMMAND',
    current_display_control: ^clt$display_control,
    define_server_utility_name: ost$name := 'DEFINE_SERVER',
    define_client_utility_name: ost$name := 'DEFINE_CLIENT',
    define_tcpip_utility_name: ost$name := 'DEFINE_TCPIP',
    definition_changed: boolean := FALSE,
    interrupt_detected: boolean := FALSE,
    line: line_space,
    local_display_control: clt$display_control,
    output_control: clt$display_control,
    output_file_id: amt$file_identifier,
    page_width: amt$page_width,
    protocol_label: [STATIC, READ] array [nat$protocol] of string (22) := [REP nac$cdna_session of ' ',
          'cdna_session', 'cdna_virtual_terminal', REP (nac$stream_socket - nac$osi_session) of ' ',
          'stream_socket', 'datagram_socket', REP (nac$max_protocol - nac$datagram_socket) of ' '],
    selected_titles_changed: boolean := FALSE,
    server_job_changed: boolean := FALSE,
    server_job_specified: boolean,
    utility_name: ost$name := 'MANAGE_NETWORK_APPLICATIONS',
    utility_state: utility_states,
    utility_state_description: array [utility_states] of string (24) := ['no subutility is active',
          'DEFINE_SERVER is active', 'DEFINE_CLIENT is active', 'DEFINE_TCP/IP is active',
          'CHANGE_SERVER is active', 'CHANGE_CLIENT is active', 'CHANGE_TCP/IP is active'],
    validation_source_label: array [nat$server_validation_source] of string (10) := ['server job', 'client'];

{ Attribute values for current application.
{ Application type is determined by the variable utility_state.

  VAR
    accept_connection: boolean,
    application_id: nat$internet_sap_identifier,
    application_name: nat$application_name,
    application_status: nat$application_status,
    capability: ost$name,
    client_addresses: ^array [1 .. * ] of nat$client_address := NIL,
    client_capability: ost$name,
    client_info_source: nat$client_info_source,
    connection_priority: nat$network_message_priority,
    max_connections: nat$number_of_connections,
    max_sockets: nat$number_of_sockets,
    nam_initiated: boolean,
    protocol: nat$protocol,
    reserved_application_id: boolean,
    ring: ost$ring,
    selected_titles: ^array [1 .. * ] of nat$selected_title := NIL,
    server_job: amt$local_file_name,
    server_job_max_connections: nat$number_of_connections,
    server_job_validation_source: nat$server_validation_source,
    server_managed_titles: ^nat$title_pattern_list := NIL,
    system_privilege: boolean;

?? OLDTITLE ??
?? NEWTITLE := 'nap$manage_network_applications', EJECT ??

  PROGRAM nap$manage_network_applications
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PURPOSE: This procedure establishes the Manage Network Applications Utility environment.
{ DESIGN:

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

      VAR
        local_status: ost$status;

      local_status.normal := TRUE;

    PROCEND exit_condition_handler;

    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      ignore_status: ost$status,
      interrupt_descriptor: pmt$established_handler,
      interrupt_condition: [STATIC] pmt$condition := [ifc$interactive_condition, ifc$terminate_break],
      local_status: ost$status,
      network_application_management: boolean,
      output_file: clt$value,
      utility_attributes: ^clt$utility_attributes;

{  PROCEDURE manna_pdt(
{    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,
    [89, 6, 23, 13, 45, 53, 262],
    clc$command, 1, 1, 0, 0, 0, 0, 1, ''], [
    ['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;


{ table manna_sub_commands
{ command (change_server,chas) processor = change_server
{ command (define_server,defs) processor = define_server
{ command (delete_server,dels) processor = delete_server
{ command (activate_server,acts) processor = activate_server
{ command (deactivate_server,deas) processor = deactivate_server
{ command (display_server_status,disss) processor = display_server_status
{ command (display_server_attributes,dissa) processor = display_server_attributes
{ command (generate_server_definition,gensd) processor = generate_server_definition
{ command (change_client,chac) processor = change_client
{ command (define_client,defc) processor = define_client
{ command (delete_client,delc) processor = delete_client
{ command (activate_client,actc) processor = activate_client
{ command (deactivate_client,deac) processor = deactivate_client
{ command (display_client_status,discs) processor = display_client_status
{ command (display_client_attributes,disca) processor = display_client_attributes
{ command (generate_client_definition,gencd) processor = generate_client_definition
{ command (change_tcpip_application, chata) processor = change_tcpip
{ command (define_tcpip_application, defta) processor = define_tcpip
{ command (delete_tcpip_application, delta) processor = delete_tcpip
{ command (activate_tcpip_application, actta) processor = activate_tcpip
{ command (deactivate_tcpip_application, deata) processor = deactivate_tcpip
{ command (display_tcpip_status, dists) processor = display_tcpip_status
{ command (display_tcpip_attributes, dista) processor = display_tcpip_attributes
{ command (generate_tcpip_definition, gentd) processor = generate_tcpip_definition
{ command (display_application_status,disas) processor = display_application_status
{ command (quit,qui) processor = quit
{ command (generate_application_definition, genad) processor = generate_application_definition

?? PUSH (LISTEXT := ON) ??

    VAR
      manna_sub_commands: [STATIC, READ] ^clt$command_table := ^manna_sub_commands_entries,

      manna_sub_commands_entries: [STATIC, READ] array [1 .. 54] of clt$command_table_entry := [
            {} ['ACTC                           ', clc$abbreviation_entry, clc$normal_usage_entry, 12,
            clc$automatically_log, clc$linked_call, ^activate_client],
            {} ['ACTIVATE_CLIENT                ', clc$nominal_entry, clc$normal_usage_entry, 12,
            clc$automatically_log, clc$linked_call, ^activate_client],
            {} ['ACTIVATE_SERVER                ', clc$nominal_entry, clc$normal_usage_entry, 4,
            clc$automatically_log, clc$linked_call, ^activate_server],
            {} ['ACTIVATE_TCPIP_APPLICATION     ', clc$nominal_entry, clc$normal_usage_entry, 20,
            clc$automatically_log, clc$linked_call, ^activate_tcpip],
            {} ['ACTS                           ', clc$abbreviation_entry, clc$normal_usage_entry, 4,
            clc$automatically_log, clc$linked_call, ^activate_server],
            {} ['ACTTA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 20,
            clc$automatically_log, clc$linked_call, ^activate_tcpip],
            {} ['CHAC                           ', clc$abbreviation_entry, clc$normal_usage_entry, 9,
            clc$automatically_log, clc$linked_call, ^change_client],
            {} ['CHANGE_CLIENT                  ', clc$nominal_entry, clc$normal_usage_entry, 9,
            clc$automatically_log, clc$linked_call, ^change_client],
            {} ['CHANGE_SERVER                  ', clc$nominal_entry, clc$normal_usage_entry, 1,
            clc$automatically_log, clc$linked_call, ^change_server],
            {} ['CHANGE_TCPIP_APPLICATION       ', clc$nominal_entry, clc$normal_usage_entry, 17,
            clc$automatically_log, clc$linked_call, ^change_tcpip],
            {} ['CHAS                           ', clc$abbreviation_entry, clc$normal_usage_entry, 1,
            clc$automatically_log, clc$linked_call, ^change_server],
            {} ['CHATA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 17,
            clc$automatically_log, clc$linked_call, ^change_tcpip],
            {} ['DEAC                           ', clc$abbreviation_entry, clc$normal_usage_entry, 13,
            clc$automatically_log, clc$linked_call, ^deactivate_client],
            {} ['DEACTIVATE_CLIENT              ', clc$nominal_entry, clc$normal_usage_entry, 13,
            clc$automatically_log, clc$linked_call, ^deactivate_client],
            {} ['DEACTIVATE_SERVER              ', clc$nominal_entry, clc$normal_usage_entry, 5,
            clc$automatically_log, clc$linked_call, ^deactivate_server],
            {} ['DEACTIVATE_TCPIP_APPLICATION   ', clc$nominal_entry, clc$normal_usage_entry, 21,
            clc$automatically_log, clc$linked_call, ^deactivate_tcpip],
            {} ['DEAS                           ', clc$abbreviation_entry, clc$normal_usage_entry, 5,
            clc$automatically_log, clc$linked_call, ^deactivate_server],
            {} ['DEATA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 21,
            clc$automatically_log, clc$linked_call, ^deactivate_tcpip],
            {} ['DEFC                           ', clc$abbreviation_entry, clc$normal_usage_entry, 10,
            clc$automatically_log, clc$linked_call, ^define_client],
            {} ['DEFINE_CLIENT                  ', clc$nominal_entry, clc$normal_usage_entry, 10,
            clc$automatically_log, clc$linked_call, ^define_client],
            {} ['DEFINE_SERVER                  ', clc$nominal_entry, clc$normal_usage_entry, 2,
            clc$automatically_log, clc$linked_call, ^define_server],
            {} ['DEFINE_TCPIP_APPLICATION       ', clc$nominal_entry, clc$normal_usage_entry, 18,
            clc$automatically_log, clc$linked_call, ^define_tcpip],
            {} ['DEFS                           ', clc$abbreviation_entry, clc$normal_usage_entry, 2,
            clc$automatically_log, clc$linked_call, ^define_server],
            {} ['DEFTA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 18,
            clc$automatically_log, clc$linked_call, ^define_tcpip],
            {} ['DELC                           ', clc$abbreviation_entry, clc$normal_usage_entry, 11,
            clc$automatically_log, clc$linked_call, ^delete_client],
            {} ['DELETE_CLIENT                  ', clc$nominal_entry, clc$normal_usage_entry, 11,
            clc$automatically_log, clc$linked_call, ^delete_client],
            {} ['DELETE_SERVER                  ', clc$nominal_entry, clc$normal_usage_entry, 3,
            clc$automatically_log, clc$linked_call, ^delete_server],
            {} ['DELETE_TCPIP_APPLICATION       ', clc$nominal_entry, clc$normal_usage_entry, 19,
            clc$automatically_log, clc$linked_call, ^delete_tcpip],
            {} ['DELS                           ', clc$abbreviation_entry, clc$normal_usage_entry, 3,
            clc$automatically_log, clc$linked_call, ^delete_server],
            {} ['DELTA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 19,
            clc$automatically_log, clc$linked_call, ^delete_tcpip],
            {} ['DISAS                          ', clc$abbreviation_entry, clc$normal_usage_entry, 25,
            clc$automatically_log, clc$linked_call, ^display_application_status],
            {} ['DISCA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 15,
            clc$automatically_log, clc$linked_call, ^display_client_attributes],
            {} ['DISCS                          ', clc$abbreviation_entry, clc$normal_usage_entry, 14,
            clc$automatically_log, clc$linked_call, ^display_client_status],
            {} ['DISPLAY_APPLICATION_STATUS     ', clc$nominal_entry, clc$normal_usage_entry, 25,
            clc$automatically_log, clc$linked_call, ^display_application_status],
            {} ['DISPLAY_CLIENT_ATTRIBUTES      ', clc$nominal_entry, clc$normal_usage_entry, 15,
            clc$automatically_log, clc$linked_call, ^display_client_attributes],
            {} ['DISPLAY_CLIENT_STATUS          ', clc$nominal_entry, clc$normal_usage_entry, 14,
            clc$automatically_log, clc$linked_call, ^display_client_status],
            {} ['DISPLAY_SERVER_ATTRIBUTES      ', clc$nominal_entry, clc$normal_usage_entry, 7,
            clc$automatically_log, clc$linked_call, ^display_server_attributes],
            {} ['DISPLAY_SERVER_STATUS          ', clc$nominal_entry, clc$normal_usage_entry, 6,
            clc$automatically_log, clc$linked_call, ^display_server_status],
            {} ['DISPLAY_TCPIP_ATTRIBUTES       ', clc$nominal_entry, clc$normal_usage_entry, 23,
            clc$automatically_log, clc$linked_call, ^display_tcpip_attributes],
            {} ['DISPLAY_TCPIP_STATUS           ', clc$nominal_entry, clc$normal_usage_entry, 22,
            clc$automatically_log, clc$linked_call, ^display_tcpip_status],
            {} ['DISSA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 7,
            clc$automatically_log, clc$linked_call, ^display_server_attributes],
            {} ['DISSS                          ', clc$abbreviation_entry, clc$normal_usage_entry, 6,
            clc$automatically_log, clc$linked_call, ^display_server_status],
            {} ['DISTA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 23,
            clc$automatically_log, clc$linked_call, ^display_tcpip_attributes],
            {} ['DISTS                          ', clc$abbreviation_entry, clc$normal_usage_entry, 22,
            clc$automatically_log, clc$linked_call, ^display_tcpip_status],
            {} ['GENAD                          ', clc$abbreviation_entry, clc$normal_usage_entry, 27,
            clc$automatically_log, clc$linked_call, ^generate_application_definition],
            {} ['GENCD                          ', clc$abbreviation_entry, clc$normal_usage_entry, 16,
            clc$automatically_log, clc$linked_call, ^generate_client_definition],
            {} ['GENERATE_APPLICATION_DEFINITION', clc$nominal_entry, clc$normal_usage_entry, 27,
            clc$automatically_log, clc$linked_call, ^generate_application_definition],
            {} ['GENERATE_CLIENT_DEFINITION     ', clc$nominal_entry, clc$normal_usage_entry, 16,
            clc$automatically_log, clc$linked_call, ^generate_client_definition],
            {} ['GENERATE_SERVER_DEFINITION     ', clc$nominal_entry, clc$normal_usage_entry, 8,
            clc$automatically_log, clc$linked_call, ^generate_server_definition],
            {} ['GENERATE_TCPIP_DEFINITION      ', clc$nominal_entry, clc$normal_usage_entry, 24,
            clc$automatically_log, clc$linked_call, ^generate_tcpip_definition],
            {} ['GENSD                          ', clc$abbreviation_entry, clc$normal_usage_entry, 8,
            clc$automatically_log, clc$linked_call, ^generate_server_definition],
            {} ['GENTD                          ', clc$abbreviation_entry, clc$normal_usage_entry, 24,
            clc$automatically_log, clc$linked_call, ^generate_tcpip_definition],
            {} ['QUI                            ', clc$abbreviation_entry, clc$normal_usage_entry, 26,
            clc$automatically_log, clc$linked_call, ^quit],
            {} ['QUIT                           ', clc$nominal_entry, clc$normal_usage_entry, 26,
            clc$automatically_log, clc$linked_call, ^quit]];

?? POP ??


?? EJECT ??

    status.normal := TRUE;
    line.size := 0;

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

    avp$get_capability (avc$network_applic_management, avc$user, network_application_management, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF NOT network_application_management THEN
      osp$set_status_abnormal (nac$status_id, nae$invalid_user, 'MANAGE_NETWORK_APPLICATIONS', status);
      RETURN;
    IFEND;

    pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    interrupt_detected := FALSE;
    pmp$establish_condition_handler (interrupt_condition, ^terminate_break_handler, ^interrupt_descriptor,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    output_file.file.local_file_name := default_output_file;
    clp$open_display (output_file.file, ^generate_headers, output_control, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    PUSH utility_attributes: [1 .. 3];

    utility_attributes^ [1].key := clc$utility_command_search_mode;
    utility_attributes^ [1].command_search_mode := clc$global_command_search;
    utility_attributes^ [2].key := clc$utility_command_table;
    utility_attributes^ [2].command_table := manna_sub_commands;
    utility_attributes^ [3].key := clc$utility_prompt;
    utility_attributes^ [3].prompt.value := prompt_string;
    utility_attributes^ [3].prompt.size := STRLENGTH (prompt_string);

    clp$begin_utility (utility_name, utility_attributes^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    utility_state := utility_idle;
    clp$include_file (clc$current_command_input, prompt_string, utility_name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$end_utility (utility_name, status);

  PROCEND nap$manage_network_applications;
?? OLDTITLE ??
?? NEWTITLE := 'Command Processors' ??
?? NEWTITLE := 'activate_client', EJECT ??

  PROCEDURE activate_client
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE activate_client_pdt (
{     client, c: name = $required
{     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,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 30, 12, 53, 47, 587],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['C                              ',clc$abbreviation_entry, 1],
    ['CLIENT                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ 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 2
    [3, 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$status_type]]];

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

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

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

    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);

    PROCEND exit_condition_handler;


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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'ACTIVATE_CLIENT', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    nap$attach_application_file (status);
    IF status.normal THEN
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nap$activate_client (pvt [p$client].value^.name_value, status);

  PROCEND activate_client;
?? OLDTITLE ??
?? NEWTITLE := 'activate_server', EJECT ??

  PROCEDURE activate_server
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE activate_server_pdt (
{     server, s: name = $required
{     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,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 30, 12, 54, 0, 556],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['S                              ',clc$abbreviation_entry, 1],
    ['SERVER                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ 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 2
    [3, 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$status_type]]];

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

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

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


    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      server: clt$value;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);

    PROCEND exit_condition_handler;


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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'ACTIVATE_SERVER', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    nap$attach_application_file (status);
    IF status.normal THEN
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nap$activate_server (pvt [p$server].value^.name_value, status);

  PROCEND activate_server;
?? OLDTITLE ??
?? NEWTITLE := 'activate_tcpip', EJECT ??

  PROCEDURE activate_tcpip
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE activate_tcpip_pdt (
{       application, a: name = $required
{       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,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 1, 9, 40, 26, 791],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['A                              ',clc$abbreviation_entry, 1],
    ['APPLICATION                    ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ 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 2
    [3, 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$status_type]]];

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

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

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


    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);

    PROCEND exit_condition_handler;


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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'ACTIVATE_TCPIP', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    nap$attach_application_file (status);

    IF status.normal THEN
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nap$activate_tcpip (pvt [p$application].value^.name_value, status);

  PROCEND activate_tcpip;
?? OLDTITLE ??
?? NEWTITLE := 'change_client', EJECT ??

  PROCEDURE change_client
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE change_client_pdt (
{    client, c: name = $required
{    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,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 23, 13, 45, 10, 172],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['C                              ',clc$abbreviation_entry, 1],
    ['CLIENT                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ 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 2
    [3, 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$status_type]]];

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

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

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


    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      ignore_status: ost$status,
      interrupt_descriptor: pmt$established_handler,
      interrupt_condition: [STATIC] pmt$condition := [ifc$interactive_condition, ifc$terminate_break],
      local_status: ost$status,
      utility_attributes: ^clt$utility_attributes;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);

    PROCEND exit_condition_handler;


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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'CHANGE_CLIENT', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    application_name := pvt [p$client].value^.name_value;

    nap$attach_application_file (status);
    IF status.normal THEN
      utility_state := changing_client;
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{ Get the client attributes which become the initial values for the attributes
{ before changing.

    nap$get_client_attributes (application_name, application_status, max_connections, connection_priority,
          protocol, reserved_application_id, application_id, capability, ring, system_privilege, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    PUSH utility_attributes: [1 .. 3];

    utility_attributes^ [1].key := clc$utility_command_search_mode;
    utility_attributes^ [1].command_search_mode := clc$restricted_command_search;
    utility_attributes^ [2].key := clc$utility_command_table;
    utility_attributes^ [2].command_table := change_client_commands;
    utility_attributes^ [3].key := clc$utility_prompt;
    utility_attributes^ [3].prompt.value := change_client_prompt_string;
    utility_attributes^ [3].prompt.size := STRLENGTH (change_client_prompt_string);

    clp$begin_utility (change_client_utility_name, utility_attributes^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    definition_changed := FALSE;

    clp$include_file (clc$current_command_input, change_client_prompt_string, change_client_utility_name,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$end_utility (change_client_utility_name, status);

  PROCEND change_client;
?? OLDTITLE ??
?? NEWTITLE := 'change_server', EJECT ??

  PROCEDURE change_server
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE change_server_pdt (
{    server, s: name = $required
{    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,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 23, 13, 45, 32, 567],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['S                              ',clc$abbreviation_entry, 1],
    ['SERVER                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ 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 2
    [3, 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$status_type]]];

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

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

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


    VAR
      client_address: array [1 .. 1] of nat$client_address,
      client_address_count: integer,
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      file: clt$file,
      file_name: ost$name,
      highest_cycle: [STATIC, READ] pft$cycle_selector := [pfc$highest_cycle],
      ignore_status: ost$status,
      interrupt_descriptor: pmt$established_handler,
      interrupt_condition: [STATIC] pmt$condition := [ifc$interactive_condition, ifc$terminate_break],
      local_status: ost$status,
      old_server_job_defined: boolean,
      path_name: [STATIC] array [1 .. 6] of pft$name := [nac$application_family,
            nac$application_master_catalog, nac$network_subcatalog, nac$application_catalog,
            nac$application_job_catalog, * ],
      selected_title: array [1 .. 1] of nat$selected_title,
      selected_title_count: nat$max_titles,
      server_managed_title: array [1 .. 1] of string (nac$max_title_pattern_length),
      server_managed_title_count: nat$max_titles,
      share_selections: [STATIC, READ] pft$usage_selections := [pfc$read],
      usage_selections: [STATIC, READ] pft$usage_selections := [pfc$read],
      utility_attributes: ^clt$utility_attributes;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);
      IF selected_titles <> NIL THEN
        FREE selected_titles;
      IFEND;
      IF client_addresses <> NIL THEN
        FREE client_addresses;
      IFEND;
      IF server_managed_titles <> NIL THEN
        FREE server_managed_titles;
      IFEND;

    PROCEND exit_condition_handler;

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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'CHANGE_SERVER', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    application_name := pvt [p$server].value^.name_value;

    nap$attach_application_file (status);
    IF status.normal THEN
      utility_state := changing_server;
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{ Get the server attributes which become the initial values of the attributes
{ before changing.

    selected_titles_changed := FALSE;
    server_job_changed := FALSE;

    nap$get_server_attributes (application_name, application_status, selected_title_count, ^selected_title,
          server_managed_title_count, ^server_managed_title, max_connections, connection_priority, capability,
          ring, system_privilege, accept_connection, client_capability, client_info_source,
          client_address_count, ^client_address, reserved_application_id, application_id, protocol,
          nam_initiated, server_job_validation_source, server_job_max_connections, old_server_job_defined,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF selected_title_count = 0 THEN
      selected_titles := NIL;
    ELSE
      ALLOCATE selected_titles: [1 .. selected_title_count];
    IFEND;
    IF server_managed_title_count = 0 THEN
      server_managed_titles := NIL;
    ELSE
      ALLOCATE server_managed_titles: [1 .. server_managed_title_count];
    IFEND;
    IF client_address_count = 0 THEN
      client_addresses := NIL;
    ELSE
      ALLOCATE client_addresses: [1 .. client_address_count];
    IFEND;
    IF (selected_title_count > 0) OR (client_address_count > 0) OR (server_managed_title_count > 0) THEN
      nap$get_server_attributes (application_name, application_status, selected_title_count, selected_titles,
            server_managed_title_count, server_managed_titles, max_connections, connection_priority,
            capability, ring, system_privilege, accept_connection, client_capability, client_info_source,
            client_address_count, client_addresses, reserved_application_id, application_id, protocol,
            nam_initiated, server_job_validation_source, server_job_max_connections, old_server_job_defined,
            status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF NOT old_server_job_defined THEN
      server_job := clc$null_file;
    IFEND;
    server_job_specified := NOT old_server_job_defined;

    PUSH utility_attributes: [1 .. 3];

    utility_attributes^ [1].key := clc$utility_command_search_mode;
    utility_attributes^ [1].command_search_mode := clc$restricted_command_search;
    utility_attributes^ [2].key := clc$utility_command_table;
    utility_attributes^ [2].command_table := change_server_commands;
    utility_attributes^ [3].key := clc$utility_prompt;
    utility_attributes^ [3].prompt.value := change_server_prompt_string;
    utility_attributes^ [3].prompt.size := STRLENGTH (change_server_prompt_string);

    clp$begin_utility (change_server_utility_name, utility_attributes^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    definition_changed := FALSE;

    clp$include_file (clc$current_command_input, change_server_prompt_string, change_server_utility_name,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$end_utility (change_server_utility_name, status);

  PROCEND change_server;
?? OLDTITLE ??
?? NEWTITLE := 'change_tcpip', EJECT ??

  PROCEDURE change_tcpip
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE change_tcpip_pdt (
{       application, a: name = $required
{       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,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 1, 9, 40, 28, 110],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['A                              ',clc$abbreviation_entry, 1],
    ['APPLICATION                    ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ 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 2
    [3, 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$status_type]]];

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

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

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

    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      tcpip_status: nat$application_status,
      utility_attributes: ^clt$utility_attributes;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);

    PROCEND exit_condition_handler;

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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'CHANGE_TCP/IP', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    application_name := pvt [p$application].value^.name_value;

    nap$get_tcpip_attributes (application_name, tcpip_status, max_sockets, capability, ring, system_privilege,
          protocol, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nap$attach_application_file (status);
    IF status.normal THEN
      utility_state := changing_tcpip;
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    PUSH utility_attributes: [1 .. 3];

    utility_attributes^ [1].key := clc$utility_command_search_mode;
    utility_attributes^ [1].command_search_mode := clc$restricted_command_search;
    utility_attributes^ [2].key := clc$utility_command_table;
    utility_attributes^ [2].command_table := change_tcpip_commands;
    utility_attributes^ [3].key := clc$utility_prompt;
    utility_attributes^ [3].prompt.value := change_tcpip_prompt_string;
    utility_attributes^ [3].prompt.size := STRLENGTH (change_tcpip_prompt_string);

    clp$begin_utility (change_tcpip_utility_name, utility_attributes^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    definition_changed := FALSE;

    clp$include_file (clc$current_command_input, change_tcpip_prompt_string, change_tcpip_utility_name,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$end_utility (change_tcpip_utility_name, status);

  PROCEND change_tcpip;
?? OLDTITLE ??
?? NEWTITLE := 'deactivate_client', EJECT ??

  PROCEDURE deactivate_client
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE  deactivate_client_pdt (
{     client, c: name = $required
{     terminate_active_connections, tac: boolean = FALSE
{     status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 5] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
        default_value: string (5),
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 10, 13, 11, 38, 113],
    clc$command, 5, 3, 1, 0, 0, 0, 3, ''], [
    ['C                              ',clc$abbreviation_entry, 1],
    ['CLIENT                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 3],
    ['TAC                            ',clc$abbreviation_entry, 2],
    ['TERMINATE_ACTIVE_CONNECTIONS   ',clc$nominal_entry, 2]],
    [
{ 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 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, 5],
{ PARAMETER 3
    [3, 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$boolean_type],
    'FALSE'],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

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

    CONST
      p$client = 1,
      p$terminate_active_connections = 2,
      p$status = 3;

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


    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);

    PROCEND exit_condition_handler;


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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'DEACTIVATE_CLIENT', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    nap$attach_application_file (status);
    IF status.normal THEN
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nap$deactivate_client (pvt [p$client].value^.name_value,
          pvt [p$terminate_active_connections].value^.boolean_value.value, status);

  PROCEND deactivate_client;
?? OLDTITLE ??
?? NEWTITLE := 'deactivate_server', EJECT ??

  PROCEDURE deactivate_server
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE deactivate_server_pdt (
{     server, s: name = $required
{     terminate_active_connections, tac: boolean = FALSE
{     status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 5] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
        default_value: string (5),
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 23, 13, 47, 4, 820],
    clc$command, 5, 3, 1, 0, 0, 0, 3, ''], [
    ['S                              ',clc$abbreviation_entry, 1],
    ['SERVER                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 3],
    ['TAC                            ',clc$abbreviation_entry, 2],
    ['TERMINATE_ACTIVE_CONNECTIONS   ',clc$nominal_entry, 2]],
    [
{ 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 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, 5],
{ PARAMETER 3
    [3, 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$boolean_type],
    'FALSE'],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

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

    CONST
      p$server = 1,
      p$terminate_active_connections = 2,
      p$status = 3;

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


    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);

    PROCEND exit_condition_handler;


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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'DEACTIVATE_SERVER', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    nap$attach_application_file (status);
    IF status.normal THEN
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nap$deactivate_server (pvt [p$server].value^.name_value,
          pvt [p$terminate_active_connections].value^.boolean_value.value, status);

  PROCEND deactivate_server;
?? OLDTITLE ??
?? NEWTITLE := 'deactivate_tcpip', EJECT ??

  PROCEDURE deactivate_tcpip
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE deact_tcpip_appl_pdt (
{       application, a: name = $required
{       terminate_active_sockets, tas: boolean = FALSE
{       status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 5] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
        default_value: string (5),
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 9, 11, 41, 28, 427],
    clc$command, 5, 3, 1, 0, 0, 0, 3, ''], [
    ['A                              ',clc$abbreviation_entry, 1],
    ['APPLICATION                    ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 3],
    ['TAS                            ',clc$abbreviation_entry, 2],
    ['TERMINATE_ACTIVE_SOCKETS       ',clc$nominal_entry, 2]],
    [
{ 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 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, 5],
{ PARAMETER 3
    [3, 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$boolean_type],
    'FALSE'],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

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

    CONST
      p$application = 1,
      p$terminate_active_sockets = 2,
      p$status = 3;

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


    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);

    PROCEND exit_condition_handler;


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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'DEACTIVATE_TCP/IP', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    nap$attach_application_file (status);

    IF status.normal THEN
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nap$deactivate_tcpip (pvt [p$application].value^.name_value,
          pvt [p$terminate_active_sockets].value^.boolean_value.value, status);

  PROCEND deactivate_tcpip;
?? OLDTITLE ??
?? NEWTITLE := 'define_client', EJECT ??

  PROCEDURE define_client
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE define_client_pdt (
{     client, c: name = $required
{     protocol, p: key
{         (cdna_session, cs)
{         (cdna_virtual_terminal, cvt)
{       keyend = $required
{     status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 5] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] 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$keyword_type_qualifier,
        keyword_specs: array [1 .. 4] of clt$keyword_specification,
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 23, 13, 47, 0, 956],
    clc$command, 5, 3, 2, 0, 0, 0, 3, ''], [
    ['C                              ',clc$abbreviation_entry, 1],
    ['CLIENT                         ',clc$nominal_entry, 1],
    ['P                              ',clc$abbreviation_entry, 2],
    ['PROTOCOL                       ',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, 5, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [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, 155,
  clc$required_parameter, 0, 0],
{ PARAMETER 3
    [5, 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$keyword_type], [4], [
    ['CDNA_SESSION                   ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['CDNA_VIRTUAL_TERMINAL          ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['CS                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['CVT                            ', clc$abbreviation_entry, clc$normal_usage_entry, 2]]
    ],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

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

    CONST
      p$client = 1,
      p$protocol = 2,
      p$status = 3;

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


    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      ignore_status: ost$status,
      interrupt_descriptor: pmt$established_handler,
      interrupt_condition: [STATIC] pmt$condition := [ifc$interactive_condition, ifc$terminate_break],
      local_status: ost$status,
      protocol_value: ost$name,
      utility_attributes: ^clt$utility_attributes;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);

    PROCEND exit_condition_handler;


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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'DEFINE_CLIENT', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    application_name := pvt [p$client].value^.name_value;
    nap$verify_application_name (application_name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nap$attach_application_file (status);
    IF status.normal THEN
      utility_state := defining_client;
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    protocol_value := pvt [p$protocol].value^.keyword_value;

    IF (protocol_value = 'CDNA_SESSION') OR (protocol_value = 'CS') THEN
      protocol := nac$cdna_session;
    ELSEIF (protocol_value = 'CDNA_VIRTUAL_TERMINAL') OR (protocol_value = 'CVT') THEN
      protocol := nac$cdna_virtual_terminal;
    IFEND;

{ Set all client attributes to initial default values.

    application_status := nac$application_inactive;
    max_connections := UPPERVALUE (nat$number_of_connections);
    connection_priority := nac$default_message_priority;
    capability := osc$null_name;
    ring := nac$default_ring;
    system_privilege := FALSE;
    reserved_application_id := FALSE;
    application_id := 0;

    PUSH utility_attributes: [1 .. 3];

    utility_attributes^ [1].key := clc$utility_command_search_mode;
    utility_attributes^ [1].command_search_mode := clc$restricted_command_search;
    utility_attributes^ [2].key := clc$utility_command_table;
    utility_attributes^ [2].command_table := define_client_commands;
    utility_attributes^ [3].key := clc$utility_prompt;
    utility_attributes^ [3].prompt.value := define_client_prompt_string;
    utility_attributes^ [3].prompt.size := STRLENGTH (define_client_prompt_string);

    clp$begin_utility (define_client_utility_name, utility_attributes^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$include_file (clc$current_command_input, define_client_prompt_string, define_client_utility_name,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$end_utility (define_client_utility_name, status);

  PROCEND define_client;
?? OLDTITLE ??
?? NEWTITLE := 'define_server', EJECT ??

  PROCEDURE define_server
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE define_server_pdt (
{     server, s: name = $required
{     protocol, p: key
{         (cdna_session, cs)
{         (cdna_virtual_terminal, cvt)
{       keyend= $required
{     nam_initiated, ni: boolean = TRUE
{     status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 7] 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$keyword_type_qualifier,
        keyword_specs: array [1 .. 4] of clt$keyword_specification,
      recend,
      type3: record
        header: clt$type_specification_header,
        default_value: string (4),
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 23, 13, 46, 57, 350],
    clc$command, 7, 4, 2, 0, 0, 0, 4, ''], [
    ['NAM_INITIATED                  ',clc$nominal_entry, 3],
    ['NI                             ',clc$abbreviation_entry, 3],
    ['P                              ',clc$abbreviation_entry, 2],
    ['PROTOCOL                       ',clc$nominal_entry, 2],
    ['S                              ',clc$abbreviation_entry, 1],
    ['SERVER                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 4]],
    [
{ PARAMETER 1
    [6, 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
    [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, 155,
  clc$required_parameter, 0, 0],
{ PARAMETER 3
    [1, 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
    [7, 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$keyword_type], [4], [
    ['CDNA_SESSION                   ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['CDNA_VIRTUAL_TERMINAL          ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['CS                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['CVT                            ', clc$abbreviation_entry, clc$normal_usage_entry, 2]]
    ],
{ PARAMETER 3
    [[1, 0, clc$boolean_type],
    'TRUE'],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$server = 1,
      p$protocol = 2,
      p$nam_initiated = 3,
      p$status = 4;

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

    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      file: clt$file,
      ignore_status: ost$status,
      interrupt_descriptor: pmt$established_handler,
      interrupt_condition: [STATIC] pmt$condition := [ifc$interactive_condition, ifc$terminate_break],
      local_status: ost$status,
      protocol_value: ost$name,
      utility_attributes: ^clt$utility_attributes;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);
      IF selected_titles <> NIL THEN
        FREE selected_titles;
      IFEND;
      IF client_addresses <> NIL THEN
        FREE client_addresses;
      IFEND;
      IF server_managed_titles <> NIL THEN
        FREE server_managed_titles;
      IFEND;

    PROCEND exit_condition_handler;

?? EJECT ??

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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'DEFINE_SERVER', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    application_name := pvt [p$server].value^.name_value;
    nap$verify_application_name (application_name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nap$attach_application_file (status);
    IF status.normal THEN
      utility_state := defining_server;
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{ Set all server attributes to initial default values.

    application_status := nac$application_inactive;
    selected_titles := NIL;
    server_managed_titles := NIL;
    max_connections := UPPERVALUE (nat$number_of_connections);
    connection_priority := nac$default_message_priority;
    capability := osc$null_name;
    ring := nac$default_ring;
    system_privilege := FALSE;
    accept_connection := TRUE;
    client_capability := osc$null_name;
    client_info_source := nac$client_info_via_dialog;
    client_addresses := NIL;
    reserved_application_id := FALSE;
    application_id := 0;
    server_job_validation_source := nac$server_job;
    server_job_max_connections := UPPERVALUE (nat$number_of_connections);
    server_job := clc$null_file;


    protocol_value := pvt [p$protocol].value^.keyword_value;
    IF (protocol_value = 'CDNA_SESSION') OR (protocol_value = 'CS') THEN
      protocol := nac$cdna_session;
    ELSEIF (protocol_value = 'CDNA_VIRTUAL_TERMINAL') OR (protocol_value = 'CVT') THEN
      protocol := nac$cdna_virtual_terminal;
    IFEND;

    nam_initiated := pvt [p$nam_initiated].value^.boolean_value.value;

    PUSH utility_attributes: [1 .. 3];

    utility_attributes^ [1].key := clc$utility_command_search_mode;
    utility_attributes^ [1].command_search_mode := clc$restricted_command_search;
    utility_attributes^ [2].key := clc$utility_command_table;
    utility_attributes^ [2].command_table := define_server_commands;
    utility_attributes^ [3].key := clc$utility_prompt;
    utility_attributes^ [3].prompt.value := define_server_prompt_string;
    utility_attributes^ [3].prompt.size := STRLENGTH (define_server_prompt_string);

    clp$begin_utility (define_server_utility_name, utility_attributes^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$include_file (clc$current_command_input, define_server_prompt_string, define_server_utility_name,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$end_utility (define_server_utility_name, status);

  PROCEND define_server;
?? OLDTITLE ??
?? NEWTITLE := 'define_tcpip', EJECT ??

  PROCEDURE define_tcpip
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE define_tcpip_appl_pdt (
{       application, a: name = $required
{       protocol, p: key
{             (stream_socket, ss)
{             (datagram_socket, ds)
{         keyend = $required
{       status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 5] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] 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$keyword_type_qualifier,
        keyword_specs: array [1 .. 4] of clt$keyword_specification,
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 1, 9, 40, 30, 141],
    clc$command, 5, 3, 2, 0, 0, 0, 3, ''], [
    ['A                              ',clc$abbreviation_entry, 1],
    ['APPLICATION                    ',clc$nominal_entry, 1],
    ['P                              ',clc$abbreviation_entry, 2],
    ['PROTOCOL                       ',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, 5, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [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, 155,
  clc$required_parameter, 0, 0],
{ PARAMETER 3
    [5, 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$keyword_type], [4], [
    ['DATAGRAM_SOCKET                ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['DS                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['SS                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['STREAM_SOCKET                  ', clc$nominal_entry, clc$normal_usage_entry, 1]]
    ],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

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

    CONST
      p$application = 1,
      p$protocol = 2,
      p$status = 3;

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

    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      utility_attributes: ^clt$utility_attributes;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);

    PROCEND exit_condition_handler;

?? EJECT ??

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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'DEFINE_TCPIP', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    application_name := pvt [p$application].value^.name_value;

    nap$verify_tcpip_name (application_name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF (pvt [p$protocol].value^.keyword_value = 'STREAM_SOCKET') OR (pvt [p$protocol].value^.keyword_value =
          'SS') THEN
      protocol := nac$stream_socket;
    ELSE
      protocol := nac$datagram_socket;
    IFEND;

    IF application_name = nac$sk_unnamed_tcp_application THEN
      IF protocol = nac$datagram_socket THEN
        osp$set_status_abnormal (nac$status_id, nae$tcp_protocol_mismatch, 'DEFINE_TCPIP', status);
        osp$append_status_parameter (osc$status_parameter_delimiter,
              utility_state_description [utility_state], status);
        RETURN;
      IFEND;
    ELSEIF application_name = nac$sk_unnamed_udp_application THEN
      IF protocol = nac$stream_socket THEN
        osp$set_status_abnormal (nac$status_id, nae$udp_protocol_mismatch, 'DEFINE_TCPIP', status);
        osp$append_status_parameter (osc$status_parameter_delimiter,
              utility_state_description [utility_state], status);
        RETURN;
      IFEND;
    IFEND;

    nap$attach_application_file (status);
    IF status.normal THEN
      utility_state := defining_tcpip;
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{ Set all tcpip attributes to initial default values.

    application_status := nac$application_inactive;
    max_sockets := UPPERVALUE (nat$number_of_sockets);
    capability := osc$null_name;
    ring := nac$default_ring;
    system_privilege := FALSE;

    PUSH utility_attributes: [1 .. 3];

    utility_attributes^ [1].key := clc$utility_command_search_mode;
    utility_attributes^ [1].command_search_mode := clc$restricted_command_search;
    utility_attributes^ [2].key := clc$utility_command_table;
    utility_attributes^ [2].command_table := define_tcpip_commands;
    utility_attributes^ [3].key := clc$utility_prompt;
    utility_attributes^ [3].prompt.value := define_tcpip_prompt_string;
    utility_attributes^ [3].prompt.size := STRLENGTH (define_tcpip_prompt_string);

    clp$begin_utility (define_tcpip_utility_name, utility_attributes^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$include_file (clc$current_command_input, define_tcpip_prompt_string, define_tcpip_utility_name,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$end_utility (define_tcpip_utility_name, status);

  PROCEND define_tcpip;
?? OLDTITLE ??
?? NEWTITLE := 'delete_client', EJECT ??

  PROCEDURE delete_client
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE delete_client_pdt (
{     client, c: name = $required
{     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,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 23, 13, 46, 54, 0],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['C                              ',clc$abbreviation_entry, 1],
    ['CLIENT                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ 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 2
    [3, 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$status_type]]];

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

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

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

    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);

    PROCEND exit_condition_handler;


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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'DELETE_CLIENT', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    nap$attach_application_file (status);
    IF status.normal THEN
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nap$delete_client (pvt [p$client].value^.name_value, status);

  PROCEND delete_client;
?? OLDTITLE ??
?? NEWTITLE := 'delete_server', EJECT ??

  PROCEDURE delete_server
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE delete_server_pdt (
{     server, s: name = $required
{     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,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 23, 13, 46, 50, 464],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['S                              ',clc$abbreviation_entry, 1],
    ['SERVER                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ 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 2
    [3, 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$status_type]]];

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

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

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


    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);

    PROCEND exit_condition_handler;


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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'DELETE_SERVER', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    nap$attach_application_file (status);
    IF status.normal THEN
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nap$delete_server (pvt [p$server].value^.name_value, status);

  PROCEND delete_server;
?? OLDTITLE ??
?? NEWTITLE := 'delete_server_managed_titles', EJECT ??

  PROCEDURE delete_server_managed_titles
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE del_serv_man_titles_pdt (
{     title_patterns, title_pattern, tp: list of any of
{       string 1..255
{       name
{       anyend = $required
{     status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        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$string_type_qualifier,
          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,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [91, 9, 30, 17, 6, 54, 209],
    clc$command, 4, 2, 1, 0, 0, 0, 2, ''], [
    ['STATUS                         ',clc$nominal_entry, 2],
    ['TITLE_PATTERN                  ',clc$alias_entry, 1],
    ['TITLE_PATTERNS                 ',clc$nominal_entry, 1],
    ['TP                             ',clc$abbreviation_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, 49, clc$required_parameter, 0, 0],
{ 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$list_type], [33, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$union_type], [[clc$name_type,
      clc$string_type],
      TRUE, 2],
      8, [[1, 0, clc$string_type], [1, 255, FALSE]],
      5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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


    VAR
      display_status: ost$status,
      i: integer,
      j: integer,
      new_title_pattern_list: ^nat$title_pattern_list,
      old_title_pattern_count: integer,
      title_pattern: string (nac$max_title_pattern_length),
      title_pattern_count: integer,
      titles_ptr: ^clt$data_value,
      warnings_given: boolean,
      valid_title_patterns: ^nat$title_pattern_list,
      valid_title_pattern_count: integer;

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

    IF server_managed_titles = NIL THEN
      old_title_pattern_count := 0;
      valid_title_pattern_count := 0;
      valid_title_patterns := NIL;
    ELSE
      old_title_pattern_count := UPPERBOUND (server_managed_titles^);
      valid_title_pattern_count := old_title_pattern_count;
      PUSH valid_title_patterns: [1 .. valid_title_pattern_count];
      valid_title_patterns^ := server_managed_titles^;
    IFEND;
    warnings_given := FALSE;

    titles_ptr := pvt [p$title_patterns].value;

  /delete/
    WHILE titles_ptr <> NIL DO
      CASE titles_ptr^.element_value^.kind OF
      = clc$name =
        title_pattern := titles_ptr^.element_value^.name_value
              (1, STRLENGTH (titles_ptr^.element_value^.name_value));
      = clc$string =
        title_pattern := titles_ptr^.element_value^.string_value^
              (1, STRLENGTH (titles_ptr^.element_value^.string_value^));
      CASEND;

      FOR j := 1 TO valid_title_pattern_count DO
        IF title_pattern = valid_title_patterns^ [j] THEN
          valid_title_patterns^ [j] := valid_title_patterns^ [valid_title_pattern_count];
          valid_title_pattern_count := valid_title_pattern_count - 1;
          titles_ptr := titles_ptr^.link;
          CYCLE /delete/;
        IFEND;
      FOREND;
      osp$set_status_abnormal (nac$status_id, nae$unknown_title_pattern, title_pattern, display_status);
      display_message (display_status, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      warnings_given := TRUE;

      titles_ptr := titles_ptr^.link;

    WHILEND /delete/;
    IF server_managed_titles <> NIL THEN
      FREE server_managed_titles;
    IFEND;
    IF valid_title_pattern_count > 0 THEN
      ALLOCATE new_title_pattern_list: [1 .. valid_title_pattern_count];
      FOR i := 1 TO valid_title_pattern_count DO
        new_title_pattern_list^ [i] := valid_title_patterns^ [i];
      FOREND;
      server_managed_titles := new_title_pattern_list;
    IFEND;

    definition_changed := (definition_changed) OR (old_title_pattern_count > valid_title_pattern_count);

    IF warnings_given THEN
      osp$set_status_abnormal (nac$status_id, nae$warnings_processing_command, 'DELETE_SERVER_MANAGED_TITLES',
            status);
    IFEND;

  PROCEND delete_server_managed_titles;
?? OLDTITLE ??
?? NEWTITLE := 'delete_tcpip', EJECT ??

  PROCEDURE delete_tcpip
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE delete_tcpip_appl_pdt (
{       application, a: name = $required
{       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,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 1, 9, 40, 30, 731],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['A                              ',clc$abbreviation_entry, 1],
    ['APPLICATION                    ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ 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 2
    [3, 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$status_type]]];

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

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

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

    VAR
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler;

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

      VAR
        ignore_status: ost$status;

      utility_state := utility_idle;
      nap$detach_application_file (ignore_status);

    PROCEND exit_condition_handler;


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

    IF utility_state <> utility_idle THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'DELETE_TCPIP', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, utility_state_description [utility_state],
            status);
      RETURN;
    IFEND;

    nap$attach_application_file (status);

    IF status.normal THEN
      pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nap$delete_tcpip (pvt [p$application].value^.name_value, status);

  PROCEND delete_tcpip;
?? OLDTITLE ??
?? NEWTITLE := 'delete_titles', EJECT ??

  PROCEDURE delete_titles
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE delete_titles_pdt (
{     titles, title, t: list of any of
{       string 1..255
{       name
{       anyend = $required
{     status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        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$string_type_qualifier,
          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,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [91, 9, 30, 17, 7, 23, 438],
    clc$command, 4, 2, 1, 0, 0, 0, 2, ''], [
    ['STATUS                         ',clc$nominal_entry, 2],
    ['T                              ',clc$abbreviation_entry, 1],
    ['TITLE                          ',clc$alias_entry, 1],
    ['TITLES                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [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, 49, clc$required_parameter, 0, 0],
{ 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$list_type], [33, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$union_type], [[clc$name_type,
      clc$string_type],
      TRUE, 2],
      8, [[1, 0, clc$string_type], [1, 255, FALSE]],
      5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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


    VAR
      delete_title_count: integer,
      display_status: ost$status,
      i: integer,
      j: integer,
      new_title_list: ^array [1 .. * ] of nat$selected_title,
      old_title_count: integer,
      title: string (nac$max_title_length),
      title_count: integer,
      titles_ptr: ^clt$data_value,
      warnings_given: boolean,
      valid_titles: ^array [1 .. * ] of nat$selected_title,
      valid_title_count: integer;

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

    IF selected_titles = NIL THEN
      old_title_count := 0;
      valid_title_count := 0;
      valid_titles := NIL;
    ELSE
      old_title_count := UPPERBOUND (selected_titles^);
      valid_title_count := old_title_count;
      PUSH valid_titles: [1 .. valid_title_count];
      valid_titles^ := selected_titles^;
    IFEND;
    warnings_given := FALSE;

    titles_ptr := pvt [p$titles].value;

  /delete/
    WHILE titles_ptr <> NIL DO
      CASE titles_ptr^.element_value^.kind OF
      = clc$name =
        title := titles_ptr^.element_value^.name_value (1, STRLENGTH (titles_ptr^.element_value^.name_value));
      = clc$string =
        title := titles_ptr^.element_value^.string_value^ (1,
              STRLENGTH (titles_ptr^.element_value^.string_value^));
      CASEND;

      FOR j := 1 TO valid_title_count DO
        IF title = valid_titles^ [j].title THEN
          valid_titles^ [j] := valid_titles^ [valid_title_count];
          valid_title_count := valid_title_count - 1;
          selected_titles_changed := TRUE;
          titles_ptr := titles_ptr^.link;
          CYCLE /delete/;
        IFEND;
      FOREND;
      osp$set_status_abnormal (nac$status_id, nae$unknown_title, title, display_status);
      display_message (display_status, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      warnings_given := TRUE;

      titles_ptr := titles_ptr^.link;

    WHILEND /delete/;
    IF selected_titles <> NIL THEN
      FREE selected_titles;
    IFEND;
    IF valid_title_count > 0 THEN
      ALLOCATE new_title_list: [1 .. valid_title_count];
      FOR i := 1 TO valid_title_count DO
        new_title_list^ [i] := valid_titles^ [i];
      FOREND;
      selected_titles := new_title_list;
    IFEND;

    definition_changed := (definition_changed) OR (old_title_count > valid_title_count);

    IF warnings_given THEN
      osp$set_status_abnormal (nac$status_id, nae$warnings_processing_command, 'DELETE_TITLES', status);
    IFEND;

  PROCEND delete_titles;
?? OLDTITLE ??
?? NEWTITLE := 'display_application_status', EJECT ??

  PROCEDURE display_application_status
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE dis_appl_status_pdt (
{     applications, application, a: list of any of key
{         all
{       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 .. 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,
        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,
    [89, 6, 23, 13, 46, 36, 268],
    clc$command, 6, 3, 0, 0, 0, 0, 3, ''], [
    ['A                              ',clc$abbreviation_entry, 1],
    ['APPLICATION                    ',clc$alias_entry, 1],
    ['APPLICATIONS                   ',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, 85,
  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], [69, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['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$applications = 1,
      p$output = 2,
      p$status = 3;

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


    VAR
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      application_count: nat$max_applications,
      application_found: boolean,
      application_index: nat$max_applications,
      application_ptr: ^clt$data_value,
      application_type: nat$application_type,
      ignore_status: ost$status,
      output_specified: boolean,
      parameter_index: integer;


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

    process_output_parameter (pvt [p$output], output_specified, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nap$get_application_names ($type_of_applications [nac$client_application, nac$server_application,
          nac$tcpip_application], application, application_count, status);
    IF NOT status.normal THEN
      osp$set_status_abnormal (nac$status_id, nae$application_not_defined, 'client, server, or TCP/IP',
            status);
      RETURN;
    IFEND;
    IF application_count > 0 THEN
      PUSH applications: [1 .. application_count];
      nap$get_application_names ($type_of_applications [nac$client_application, nac$server_application,
            nac$tcpip_application], applications^, application_count, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    application_ptr := pvt [p$applications].value;

  /generate_display/
    BEGIN
      WHILE application_ptr <> NIL DO
        CASE application_ptr^.element_value^.kind OF
        = clc$keyword =
          FOR application_index := 1 TO application_count DO
            CASE applications^ [application_index].application_type OF
            = nac$client_application =
              generate_client_status_display (applications^ [application_index].name, status);
            = nac$server_application =
              generate_server_status_display (applications^ [application_index].name, status);
            = nac$tcpip_application =
              generate_tcpip_status_display (applications^ [application_index].name, status);
            CASEND;
            IF NOT status.normal THEN
              EXIT /generate_display/;
            IFEND;
          FOREND;
          EXIT /generate_display/;
        = clc$name =
          application_found := FALSE;
          FOR application_index := 1 TO application_count DO
            IF (application_ptr^.element_value^.name_value = applications^ [application_index].name) THEN
              application_found := TRUE;
              CASE applications^ [application_index].application_type OF
              = nac$client_application =
                generate_client_status_display (applications^ [application_index].name, status);
              = nac$server_application =
                generate_server_status_display (applications^ [application_index].name, status);
              = nac$tcpip_application =
                generate_tcpip_status_display (applications^ [application_index].name, status);
              CASEND;
              IF NOT status.normal THEN
                EXIT /generate_display/;
              IFEND;
            IFEND;
          FOREND;
          IF NOT application_found THEN
            osp$set_status_abnormal (nac$status_id, nae$unknown_application,
                  application_ptr^.element_value^.name_value, status);
            EXIT /generate_display/;
          IFEND;
        CASEND;

        application_ptr := application_ptr^.link;

      WHILEND;
    END /generate_display/;

    IF output_specified THEN
      clp$close_display (local_display_control, ignore_status);
    IFEND;

  PROCEND display_application_status;
?? OLDTITLE ??
?? NEWTITLE := 'display_client_attributes', EJECT ??

  PROCEDURE display_client_attributes
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{   PROCEDURE dis_client_attrib_pdt (
{   client, c: list of any of key
{       all
{     keyend
{     name
{     anyend = all
{   display_options, display_option, do, attributes, attribute, a: list of key
{       (protocol, p)
{       (application_identifier, ai)
{       (maximum_connections, mc)
{       (connection_priority, cp)
{       (client_capability, cc)
{       (client_ring, cr)
{       (client_status, cs)
{       (client_system_privilege, csp)
{        all
{     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 .. 11] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        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 .. 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,
        default_value: string (3),
      recend,
      type2: 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 .. 17] of clt$keyword_specification,
        recend,
        default_value: string (3),
      recend,
      type3: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [90, 7, 25, 7, 47, 4, 649],
    clc$command, 11, 4, 0, 0, 0, 0, 4, ''], [
    ['A                              ',clc$abbreviation_entry, 2],
    ['ATTRIBUTE                      ',clc$alias_entry, 2],
    ['ATTRIBUTES                     ',clc$alias_entry, 2],
    ['C                              ',clc$abbreviation_entry, 1],
    ['CLIENT                         ',clc$nominal_entry, 1],
    ['DISPLAY_OPTION                 ',clc$alias_entry, 2],
    ['DISPLAY_OPTIONS                ',clc$nominal_entry, 2],
    ['DO                             ',clc$alias_entry, 2],
    ['O                              ',clc$abbreviation_entry, 3],
    ['OUTPUT                         ',clc$nominal_entry, 3],
    ['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, 85, clc$optional_default_parameter, 0, 3],
{ 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, 652, clc$optional_default_parameter, 0, 3],
{ PARAMETER 3
    [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, 3, clc$optional_default_parameter, 0, 7],
{ PARAMETER 4
    [11, 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], [69, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type,
      clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['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$list_type], [636, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$keyword_type], [17], [
      ['AI                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
      ['ALL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 9],
      ['APPLICATION_IDENTIFIER         ', clc$nominal_entry,
  clc$normal_usage_entry, 2],
      ['CC                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 5],
      ['CLIENT_CAPABILITY              ', clc$nominal_entry,
  clc$normal_usage_entry, 5],
      ['CLIENT_RING                    ', clc$nominal_entry,
  clc$normal_usage_entry, 6],
      ['CLIENT_STATUS                  ', clc$nominal_entry,
  clc$normal_usage_entry, 7],
      ['CLIENT_SYSTEM_PRIVILEGE        ', clc$nominal_entry,
  clc$normal_usage_entry, 8],
      ['CONNECTION_PRIORITY            ', clc$nominal_entry,
  clc$normal_usage_entry, 4],
      ['CP                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 4],
      ['CR                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 6],
      ['CS                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 7],
      ['CSP                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 8],
      ['MAXIMUM_CONNECTIONS            ', clc$nominal_entry,
  clc$normal_usage_entry, 3],
      ['MC                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 3],
      ['P                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 1],
      ['PROTOCOL                       ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
      ]
    ,
    'all'],
{ PARAMETER 3
    [[1, 0, clc$file_type],
    '$output'],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$client = 1,
      p$display_options = 2,
      p$output = 3,
      p$status = 4;

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


    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      attributes: client_attribute_set,
      client_ptr: ^clt$data_value,
      ignore_status: ost$status,
      output_specified: boolean;


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

    process_client_attrib_parameter (pvt [p$display_options], attributes, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    process_output_parameter (pvt [p$output], output_specified, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    client_ptr := pvt [p$client].value;

  /generate_display/
    BEGIN
      WHILE client_ptr <> NIL DO
        CASE client_ptr^.element_value^.kind OF
        = clc$keyword =
          nap$get_application_names ($type_of_applications [nac$client_application], application,
                application_count, status);
          IF NOT status.normal THEN
            EXIT /generate_display/;
          IFEND;
          IF application_count > 0 THEN
            PUSH applications: [1 .. application_count];
            nap$get_application_names ($type_of_applications [nac$client_application], applications^,
                  application_count, status);
            IF NOT status.normal THEN
              EXIT /generate_display/;
            IFEND;
            FOR application_index := 1 TO application_count DO
              display_installed_client (applications^ [application_index].name, attributes, status);
              IF NOT status.normal THEN
                EXIT /generate_display/;
              IFEND;
            FOREND;
          ELSE
            osp$set_status_abnormal (nac$status_id, nae$application_not_defined, 'client', status);
          IFEND;
          EXIT /generate_display/;
        = clc$name =
          display_installed_client (client_ptr^.element_value^.name_value, attributes, status);
          IF NOT status.normal THEN
            EXIT /generate_display/;
          IFEND;
        CASEND;
        client_ptr := client_ptr^.link;

      WHILEND;
    END /generate_display/;

    IF output_specified THEN
      clp$close_display (local_display_control, ignore_status);
    IFEND;

  PROCEND display_client_attributes;
?? OLDTITLE ??
?? NEWTITLE := 'display_client_status', EJECT ??

  PROCEDURE display_client_status
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE dis_client_status_pdt (
{     client, c: list of any of key
{         all
{       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 .. 5] 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 .. 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,
        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,
    [89, 6, 23, 13, 47, 49, 568],
    clc$command, 5, 3, 0, 0, 0, 0, 3, ''], [
    ['C                              ',clc$abbreviation_entry, 1],
    ['CLIENT                         ',clc$nominal_entry, 1],
    ['O                              ',clc$abbreviation_entry, 2],
    ['OUTPUT                         ',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$optional_default_parameter, 0, 3],
{ PARAMETER 2
    [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, 3,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 3
    [5, 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], [69, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['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$client = 1,
      p$output = 2,
      p$status = 3;

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


    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      client_ptr: ^clt$data_value,
      ignore_status: ost$status,
      j: integer,
      output_specified: boolean;


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

    process_output_parameter (pvt [p$output], output_specified, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    client_ptr := pvt [p$client].value;

  /display_client/
    WHILE client_ptr <> NIL DO
      CASE client_ptr^.element_value^.kind OF
      = clc$keyword =
        nap$get_application_names ($type_of_applications [nac$client_application], application,
              application_count, status);
        IF NOT status.normal THEN
          EXIT /display_client/;
        IFEND;
        IF application_count > 0 THEN
          PUSH applications: [1 .. application_count];
          nap$get_application_names ($type_of_applications [nac$client_application], applications^,
                application_count, status);
          IF NOT status.normal THEN
            EXIT /display_client/;
          IFEND;
          FOR application_index := 1 TO application_count DO
            IF applications^ [application_index].application_type = nac$client_application THEN
              generate_client_status_display (applications^ [application_index].name, status);
              IF NOT status.normal THEN
                EXIT /display_client/;
              IFEND;
            IFEND;
          FOREND;
        ELSE
          osp$set_status_abnormal (nac$status_id, nae$application_not_defined, 'client', status);
        IFEND;
        EXIT /display_client/;
      = clc$name =
        generate_client_status_display (client_ptr^.element_value^.name_value, status);
        IF NOT status.normal THEN
          EXIT /display_client/;
        IFEND;
      CASEND;
      client_ptr := client_ptr^.link;

    WHILEND /display_client/;

    IF output_specified THEN
      clp$close_display (local_display_control, ignore_status);
    IFEND;

  PROCEND display_client_status;
?? OLDTITLE ??
?? NEWTITLE := 'display_server_attributes', EJECT ??

  PROCEDURE display_server_attributes
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{   PROCEDURE dis_server_attrib_pdt (
{   server, s: list of any of key
{       all
{     keyend
{     name
{     anyend = all
{   display_options, display_option, do, attributes, attribute, a: list of key
{       (accept_connection, ac)
{       (application_identifier, ai)
{       (client_addresses, client_address, ca)
{       (client_info_source, cis)
{       (client_validation, cv)
{       (connection_priority, cp)
{       (maximum_connections, mc)
{       (nam_initiated, ni)
{       (protocol, p)
{       (server_capability, sc)
{       (server_job, sj)
{       (server_job_maximum_connections, sjmc)
{       (server_job_validation_source, sjvs)
{       (server_managed_titles, server_managed_title, smt)
{       (server_ring, sr)
{       (server_status, ss)
{       (server_system_privilege, ssp)
{      (titles, title, t)
{       (title_attributes, title_attribute, ta)
{       all
{     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 .. 11] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        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 .. 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,
        default_value: string (3),
      recend,
      type2: 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 .. 43] of clt$keyword_specification,
        recend,
        default_value: string (3),
      recend,
      type3: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [90, 5, 29, 15, 57, 41, 224],
    clc$command, 11, 4, 0, 0, 0, 0, 4, ''], [
    ['A                              ',clc$abbreviation_entry, 2],
    ['ATTRIBUTE                      ',clc$alias_entry, 2],
    ['ATTRIBUTES                     ',clc$alias_entry, 2],
    ['DISPLAY_OPTION                 ',clc$alias_entry, 2],
    ['DISPLAY_OPTIONS                ',clc$nominal_entry, 2],
    ['DO                             ',clc$alias_entry, 2],
    ['O                              ',clc$abbreviation_entry, 3],
    ['OUTPUT                         ',clc$nominal_entry, 3],
    ['S                              ',clc$abbreviation_entry, 1],
    ['SERVER                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 4]],
    [
{ PARAMETER 1
    [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, 85, 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, 1614, clc$optional_default_parameter, 0, 3],
{ 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, 3, clc$optional_default_parameter, 0, 7],
{ PARAMETER 4
    [11, 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], [69, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type,
      clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['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$list_type], [1598, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$keyword_type], [43], [
      ['AC                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 1],
      ['ACCEPT_CONNECTION              ', clc$nominal_entry,
  clc$normal_usage_entry, 1],
      ['AI                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
      ['ALL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 20],
      ['APPLICATION_IDENTIFIER         ', clc$nominal_entry,
  clc$normal_usage_entry, 2],
      ['CA                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 3],
      ['CIS                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 4],
      ['CLIENT_ADDRESS                 ', clc$alias_entry,
  clc$normal_usage_entry, 3],
      ['CLIENT_ADDRESSES               ', clc$nominal_entry,
  clc$normal_usage_entry, 3],
      ['CLIENT_INFO_SOURCE             ', clc$nominal_entry,
  clc$normal_usage_entry, 4],
      ['CLIENT_VALIDATION              ', clc$nominal_entry,
  clc$normal_usage_entry, 5],
      ['CONNECTION_PRIORITY            ', clc$nominal_entry,
  clc$normal_usage_entry, 6],
      ['CP                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 6],
      ['CV                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 5],
      ['MAXIMUM_CONNECTIONS            ', clc$nominal_entry,
  clc$normal_usage_entry, 7],
      ['MC                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 7],
      ['NAM_INITIATED                  ', clc$nominal_entry,
  clc$normal_usage_entry, 8],
      ['NI                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 8],
      ['P                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 9],
      ['PROTOCOL                       ', clc$nominal_entry,
  clc$normal_usage_entry, 9],
      ['SC                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 10],
      ['SERVER_CAPABILITY              ', clc$nominal_entry,
  clc$normal_usage_entry, 10],
      ['SERVER_JOB                     ', clc$nominal_entry,
  clc$normal_usage_entry, 11],
      ['SERVER_JOB_MAXIMUM_CONNECTIONS ', clc$nominal_entry,
  clc$normal_usage_entry, 12],
      ['SERVER_JOB_VALIDATION_SOURCE   ', clc$nominal_entry,
  clc$normal_usage_entry, 13],
      ['SERVER_MANAGED_TITLE           ', clc$alias_entry,
  clc$normal_usage_entry, 14],
      ['SERVER_MANAGED_TITLES          ', clc$nominal_entry,
  clc$normal_usage_entry, 14],
      ['SERVER_RING                    ', clc$nominal_entry,
  clc$normal_usage_entry, 15],
      ['SERVER_STATUS                  ', clc$nominal_entry,
  clc$normal_usage_entry, 16],
      ['SERVER_SYSTEM_PRIVILEGE        ', clc$nominal_entry,
  clc$normal_usage_entry, 17],
      ['SJ                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 11],
      ['SJMC                           ', clc$abbreviation_entry,
  clc$normal_usage_entry, 12],
      ['SJVS                           ', clc$abbreviation_entry,
  clc$normal_usage_entry, 13],
      ['SMT                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 14],
      ['SR                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 15],
      ['SS                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 16],
      ['SSP                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 17],
      ['T                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 18],
      ['TA                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 19],
      ['TITLE                          ', clc$alias_entry,
  clc$normal_usage_entry, 18],
      ['TITLES                         ', clc$nominal_entry,
  clc$normal_usage_entry, 18],
      ['TITLE_ATTRIBUTE                ', clc$alias_entry,
  clc$normal_usage_entry, 19],
      ['TITLE_ATTRIBUTES               ', clc$nominal_entry,
  clc$normal_usage_entry, 19]]
      ]
    ,
    'all'],
{ PARAMETER 3
    [[1, 0, clc$file_type],
    '$output'],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$server = 1,
      p$display_options = 2,
      p$output = 3,
      p$status = 4;

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

    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      attributes: server_attribute_set,
      ignore_status: ost$status,
      output_specified: boolean,
      server_ptr: ^clt$data_value;


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

    process_server_attrib_parameter (pvt [p$display_options], attributes, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    process_output_parameter (pvt [p$output], output_specified, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    server_ptr := pvt [p$server].value;

  /generate_display/
    BEGIN
      WHILE server_ptr <> NIL DO
        CASE server_ptr^.element_value^.kind OF
        = clc$keyword =
          nap$get_application_names ($type_of_applications [nac$server_application], application,
                application_count, status);
          IF NOT status.normal THEN
            EXIT /generate_display/;
          IFEND;
          IF application_count > 0 THEN
            PUSH applications: [1 .. application_count];
            nap$get_application_names ($type_of_applications [nac$server_application], applications^,
                  application_count, status);
            IF NOT status.normal THEN
              EXIT /generate_display/;
            IFEND;
            FOR application_index := 1 TO application_count DO
              display_installed_server (applications^ [application_index].name, attributes, status);
              IF NOT status.normal THEN
                EXIT /generate_display/;
              IFEND;
            FOREND;
          ELSE
            osp$set_status_abnormal (nac$status_id, nae$application_not_defined, 'server', status);
          IFEND;
          EXIT /generate_display/;
        = clc$name =
          display_installed_server (server_ptr^.element_value^.name_value, attributes, status);
          IF NOT status.normal THEN
            EXIT /generate_display/;
          IFEND;
        CASEND;
        server_ptr := server_ptr^.link;

      WHILEND;
    END /generate_display/;

    IF output_specified THEN
      clp$close_display (local_display_control, ignore_status);
    IFEND;

  PROCEND display_server_attributes;
?? OLDTITLE ??
?? NEWTITLE := 'display_server_status', EJECT ??

  PROCEDURE display_server_status
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE dis_server_status_pdt (
{     server, s: list of any of key
{         all
{       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 .. 5] 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 .. 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,
        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,
    [89, 6, 23, 13, 46, 20, 360],
    clc$command, 5, 3, 0, 0, 0, 0, 3, ''], [
    ['O                              ',clc$abbreviation_entry, 2],
    ['OUTPUT                         ',clc$nominal_entry, 2],
    ['S                              ',clc$abbreviation_entry, 1],
    ['SERVER                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 3]],
    [
{ PARAMETER 1
    [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, 85,
  clc$optional_default_parameter, 0, 3],
{ 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, 3,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 3
    [5, 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], [69, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['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$server = 1,
      p$output = 2,
      p$status = 3;

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


    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      ignore_status: ost$status,
      output_specified: boolean,
      server_ptr: ^clt$data_value;


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

    process_output_parameter (pvt [p$output], output_specified, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    server_ptr := pvt [p$server].value;

  /generate_display/
    WHILE server_ptr <> NIL DO
      CASE server_ptr^.element_value^.kind OF
      = clc$keyword =
        nap$get_application_names ($type_of_applications [nac$server_application], application,
              application_count, status);
        IF NOT status.normal THEN
          EXIT /generate_display/;
        IFEND;
        IF application_count > 0 THEN
          PUSH applications: [1 .. application_count];
          nap$get_application_names ($type_of_applications [nac$server_application], applications^,
                application_count, status);
          IF NOT status.normal THEN
            EXIT /generate_display/;
          IFEND;
          FOR application_index := 1 TO application_count DO
            generate_server_status_display (applications^ [application_index].name, status);
            IF NOT status.normal THEN
              EXIT /generate_display/;
            IFEND;
          FOREND;
        ELSE
          osp$set_status_abnormal (nac$status_id, nae$application_not_defined, 'server', status);
        IFEND;
        EXIT /generate_display/;
      = clc$name =
        generate_server_status_display (server_ptr^.element_value^.name_value, status);
        IF NOT status.normal THEN
          EXIT /generate_display/;
        IFEND;
      CASEND;
      server_ptr := server_ptr^.link;

    WHILEND /generate_display/;

    IF output_specified THEN
      clp$close_display (local_display_control, ignore_status);
    IFEND;

  PROCEND display_server_status;
?? OLDTITLE ??
?? NEWTITLE := 'display_tcpip_attributes', EJECT ??

  PROCEDURE display_tcpip_attributes
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE display_tcpip_attr_pdt (
{       application, a: list of any of key
{             all
{         keyend
{         name
{         anyend = all
{       display_option, display_options, do: list of key
{             (protocol, p)
{             (maximum_sockets, ms)
{             (capability, c)
{             (ring, r)
{             (system_privilege, sp)
{             all
{         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 .. 8] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] 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 .. 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,
        default_value: string (3),
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 11] of clt$keyword_specification,
        recend,
        default_value: string (3),
      recend,
      type3: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 9, 11, 42, 7, 46],
    clc$command, 8, 4, 0, 0, 0, 0, 4, ''], [
    ['A                              ',clc$abbreviation_entry, 1],
    ['APPLICATION                    ',clc$nominal_entry, 1],
    ['DISPLAY_OPTION                 ',clc$nominal_entry, 2],
    ['DISPLAY_OPTIONS                ',clc$alias_entry, 2],
    ['DO                             ',clc$abbreviation_entry, 2],
    ['O                              ',clc$abbreviation_entry, 3],
    ['OUTPUT                         ',clc$nominal_entry, 3],
    ['STATUS                         ',clc$nominal_entry, 4]],
    [
{ 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$optional_default_parameter, 0, 3],
{ 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, 430,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 3
    [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, 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$list_type], [69, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['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$list_type], [414, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$keyword_type], [11], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 6],
      ['C                              ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
      ['CAPABILITY                     ', clc$nominal_entry, clc$normal_usage_entry, 3],
      ['MAXIMUM_SOCKETS                ', clc$nominal_entry, clc$normal_usage_entry, 2],
      ['MS                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
      ['P                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
      ['PROTOCOL                       ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['R                              ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
      ['RING                           ', clc$nominal_entry, clc$normal_usage_entry, 4],
      ['SYSTEM_PRIVILEGE               ', clc$nominal_entry, clc$normal_usage_entry, 5],
      ['SP                             ', clc$abbreviation_entry, clc$normal_usage_entry, 5]]
      ]
    ,
    'all'],
{ PARAMETER 3
    [[1, 0, clc$file_type],
    '$output'],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$application = 1,
      p$display_option = 2,
      p$output = 3,
      p$status = 4;

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


    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      attributes: tcpip_attribute_set,
      ignore_status: ost$status,
      output_specified: boolean,
      tcpip_index_ptr: ^clt$data_value;


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

    process_tcpip_attrib_parameter (pvt [p$display_option], attributes, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    process_output_parameter (pvt [p$output], output_specified, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  /generate_display/
    BEGIN
      tcpip_index_ptr := pvt [p$application].value;
      WHILE tcpip_index_ptr <> NIL DO
        CASE tcpip_index_ptr^.element_value^.kind OF
        = clc$keyword =
          nap$get_application_names ($type_of_applications [nac$tcpip_application], application,
                application_count, status);
          IF NOT status.normal THEN
            EXIT /generate_display/;
          IFEND;
          IF application_count > 0 THEN
            PUSH applications: [1 .. application_count];
            nap$get_application_names ($type_of_applications [nac$tcpip_application], applications^,
                  application_count, status);
            IF NOT status.normal THEN
              EXIT /generate_display/;
            IFEND;
            FOR application_index := 1 TO application_count DO
              display_installed_tcpip (applications^ [application_index].name, attributes, status);
              IF NOT status.normal THEN
                EXIT /generate_display/;
              IFEND;
            FOREND;
          ELSE
            osp$set_status_abnormal (nac$status_id, nae$application_not_defined, 'tcpip', status);
          IFEND;
          EXIT /generate_display/;
        = clc$name =
          display_installed_tcpip (tcpip_index_ptr^.element_value^.name_value, attributes, status);
          IF NOT status.normal THEN
            EXIT /generate_display/;
          IFEND;
        CASEND;
        tcpip_index_ptr := tcpip_index_ptr^.link;
      WHILEND;
    END /generate_display/;

    IF output_specified THEN
      clp$close_display (local_display_control, ignore_status);
    IFEND;

  PROCEND display_tcpip_attributes;
?? OLDTITLE ??
?? NEWTITLE := 'display_tcpip_status', EJECT ??

  PROCEDURE display_tcpip_status
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE display_tcpip_stat_pdt (
{       application, a: list of any of key
{             all
{         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 .. 5] 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 .. 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,
        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,
    [89, 6, 1, 9, 40, 32, 412],
    clc$command, 5, 3, 0, 0, 0, 0, 3, ''], [
    ['A                              ',clc$abbreviation_entry, 1],
    ['APPLICATION                    ',clc$nominal_entry, 1],
    ['O                              ',clc$abbreviation_entry, 2],
    ['OUTPUT                         ',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$optional_default_parameter, 0, 3],
{ PARAMETER 2
    [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, 3,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 3
    [5, 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], [69, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['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$application = 1,
      p$output = 2,
      p$status = 3;

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


    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      ignore_status: ost$status,
      output_specified: boolean,
      tcpip: clt$value,
      tcpip_count: integer,
      tcpip_index_ptr: ^clt$data_value;


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

    process_output_parameter (pvt [p$output], output_specified, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    tcpip_index_ptr := pvt [p$application].value;

  /generate_display/
    WHILE tcpip_index_ptr <> NIL DO
      CASE tcpip_index_ptr^.element_value^.kind OF
      = clc$keyword =
        nap$get_application_names ($type_of_applications [nac$tcpip_application], application,
              application_count, status);
        IF NOT status.normal THEN
          EXIT /generate_display/;
        IFEND;
        IF application_count > 0 THEN
          PUSH applications: [1 .. application_count];
          nap$get_application_names ($type_of_applications [nac$tcpip_application], applications^,
                application_count, status);
          IF NOT status.normal THEN
            EXIT /generate_display/;
          IFEND;
          FOR application_index := 1 TO application_count DO
            generate_tcpip_status_display (applications^ [application_index].name, status);
            IF NOT status.normal THEN
              EXIT /generate_display/;
            IFEND;
          FOREND;
        ELSE
          osp$set_status_abnormal (nac$status_id, nae$application_not_defined, 'tcpip', status);
        IFEND;
        EXIT /generate_display/;
      = clc$name =
        generate_tcpip_status_display (tcpip_index_ptr^.element_value^.name_value, status);
        IF NOT status.normal THEN
          EXIT /generate_display/;
        IFEND;
      CASEND;
      tcpip_index_ptr := tcpip_index_ptr^.link;
    WHILEND /generate_display/;

    IF output_specified THEN
      clp$close_display (local_display_control, ignore_status);
    IFEND;

  PROCEND display_tcpip_status;
?? OLDTITLE ??
?? NEWTITLE := 'generate_application_definition', EJECT ??

  PROCEDURE generate_application_definition
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE gen_application_def_pdt (
{        applications, application, a: list of any of key
{            all
{          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_v2,
        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 .. 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,
        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,
    [90, 7, 25, 7, 55, 17, 9],
    clc$command, 6, 3, 0, 0, 0, 0, 3, ''], [
    ['A                              ',clc$abbreviation_entry, 1],
    ['APPLICATION                    ',clc$alias_entry, 1],
    ['APPLICATIONS                   ',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, 85, 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], [69, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type,
      clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['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$applications = 1,
      p$output = 2,
      p$status = 3;

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


    VAR
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      application_count: nat$max_applications,
      application_found: boolean,
      application_index: nat$max_applications,
      application_ptr: ^clt$data_value,
      application_type: nat$application_type,
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      ignore_status: ost$status,
      local_status: ost$status,
      parameter_index: integer;

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

      VAR
        ignore_status: ost$status;

      fsp$close_file (output_file_id, ignore_status);

    PROCEND exit_condition_handler;

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

    pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    process_output_file (pvt [p$output].value^.file_value^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    nap$get_application_names ($type_of_applications [nac$client_application, nac$server_application,
          nac$tcpip_application], application, application_count, status);
    IF NOT status.normal THEN
      osp$set_status_abnormal (nac$status_id, nae$application_not_defined, 'client, server, or TCP/IP',
            status);
      RETURN;
    IFEND;

    PUSH applications: [1 .. application_count];
    nap$get_application_names ($type_of_applications [nac$client_application, nac$server_application,
          nac$tcpip_application], applications^, application_count, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    application_ptr := pvt [p$applications].value;

  /generate_definition/
    BEGIN
      WHILE application_ptr <> NIL DO
        CASE application_ptr^.element_value^.kind OF
        = clc$keyword =
          FOR application_index := 1 TO application_count DO
            CASE applications^ [application_index].application_type OF
            = nac$client_application =
              generate_installed_client_def (applications^ [application_index].name, status);
            = nac$server_application =
              generate_installed_server_def (applications^ [application_index].name, status);
            = nac$tcpip_application =
              generate_installed_tcpip_def (applications^ [application_index].name, status);
            CASEND;
            IF NOT status.normal THEN
              EXIT /generate_definition/;
            IFEND;
          FOREND;
          EXIT /generate_definition/;
        = clc$name =
          application_found := FALSE;
          FOR application_index := 1 TO application_count DO
            IF (application_ptr^.element_value^.name_value = applications^ [application_index].name) THEN
              application_found := TRUE;
              CASE applications^ [application_index].application_type OF
              = nac$client_application =
                generate_installed_client_def (applications^ [application_index].name, status);
              = nac$server_application =
                generate_installed_server_def (applications^ [application_index].name, status);
              = nac$tcpip_application =
                generate_installed_tcpip_def (applications^ [application_index].name, status);
              CASEND;
              IF NOT status.normal THEN
                EXIT /generate_definition/;
              IFEND;
            IFEND;
          FOREND;
          IF NOT application_found THEN
            osp$set_status_abnormal (nac$status_id, nae$unknown_application,
                  application_ptr^.element_value^.name_value, status);
            EXIT /generate_definition/;
          IFEND;
        ELSE
        CASEND;

        application_ptr := application_ptr^.link;

      WHILEND;
    END /generate_definition/;

    fsp$close_file (output_file_id, local_status);
    IF (NOT local_status.normal) AND status.normal THEN
      status := local_status;
    IFEND;
    pmp$disestablish_cond_handler (exit_condition, ignore_status);

  PROCEND generate_application_definition;
?? OLDTITLE ??
?? NEWTITLE := 'generate_client_definition', EJECT ??

  PROCEDURE generate_client_definition
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE gen_client_def_pdt (
{        client, c: list of any of key
{            all
{          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 .. 5] 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 .. 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,
        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,
    [89, 6, 23, 13, 46, 6, 1],
    clc$command, 5, 3, 0, 0, 0, 0, 3, ''], [
    ['C                              ',clc$abbreviation_entry, 1],
    ['CLIENT                         ',clc$nominal_entry, 1],
    ['O                              ',clc$abbreviation_entry, 2],
    ['OUTPUT                         ',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$optional_default_parameter, 0, 3],
{ PARAMETER 2
    [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, 3,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 3
    [5, 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], [69, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['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$client = 1,
      p$output = 2,
      p$status = 3;

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


    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      client_ptr: ^clt$data_value,
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      ignore_status: ost$status,
      local_status: ost$status;

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

      VAR
        ignore_status: ost$status;

      fsp$close_file (output_file_id, ignore_status);

    PROCEND exit_condition_handler;

    status.normal := TRUE;

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

    pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    process_output_file (pvt [p$output].value^.file_value^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    client_ptr := pvt [p$client].value;

  /generate_definition/
    BEGIN
      WHILE client_ptr <> NIL DO
        CASE client_ptr^.element_value^.kind OF
        = clc$keyword =
          nap$get_application_names ($type_of_applications [nac$client_application], application,
                application_count, status);
          IF NOT status.normal THEN
            EXIT /generate_definition/;
          IFEND;
          IF application_count > 0 THEN
            PUSH applications: [1 .. application_count];
            nap$get_application_names ($type_of_applications [nac$client_application], applications^,
                  application_count, status);
            IF NOT status.normal THEN
              EXIT /generate_definition/;
            IFEND;
            FOR application_index := 1 TO application_count DO
              generate_installed_client_def (applications^ [application_index].name, status);
              IF NOT status.normal THEN
                EXIT /generate_definition/;
              IFEND;
            FOREND;
          ELSE
            osp$set_status_abnormal (nac$status_id, nae$application_not_defined, 'client', status);
          IFEND;
          EXIT /generate_definition/;
        = clc$name =
          generate_installed_client_def (client_ptr^.element_value^.name_value, status);
          IF NOT status.normal THEN
            EXIT /generate_definition/;
          IFEND;
        CASEND;
        client_ptr := client_ptr^.link;

      WHILEND;
    END /generate_definition/;

    fsp$close_file (output_file_id, local_status);
    IF (NOT local_status.normal) AND status.normal THEN
      status := local_status;
    IFEND;

  PROCEND generate_client_definition;
?? OLDTITLE ??
?? NEWTITLE := 'generate_server_definition', EJECT ??

  PROCEDURE generate_server_definition
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE gen_server_def_pdt (
{        server, s: list of any of key
{            all
{          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 .. 5] 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_v2,
        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 .. 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,
        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,
    [90, 7, 25, 8, 1, 35, 168],
    clc$command, 5, 3, 0, 0, 0, 0, 3, ''], [
    ['O                              ',clc$abbreviation_entry, 2],
    ['OUTPUT                         ',clc$nominal_entry, 2],
    ['S                              ',clc$abbreviation_entry, 1],
    ['SERVER                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 3]],
    [
{ PARAMETER 1
    [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, 85, clc$optional_default_parameter, 0, 3],
{ 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, 3, clc$optional_default_parameter, 0, 7],
{ PARAMETER 3
    [5, 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], [69, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type,
      clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['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$server = 1,
      p$output = 2,
      p$status = 3;

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


    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      ignore_status: ost$status,
      local_status: ost$status,
      server_ptr: ^clt$data_value;

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

      VAR
        ignore_status: ost$status;

      fsp$close_file (output_file_id, ignore_status);

    PROCEND exit_condition_handler;

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

    pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    process_output_file (pvt [p$output].value^.file_value^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    server_ptr := pvt [p$server].value;

  /generate_definition/
    BEGIN
      WHILE server_ptr <> NIL DO
        CASE server_ptr^.element_value^.kind OF
        = clc$keyword =
          nap$get_application_names ($type_of_applications [nac$server_application], application,
                application_count, status);
          IF NOT status.normal THEN
            EXIT /generate_definition/;
          IFEND;
          IF application_count > 0 THEN
            PUSH applications: [1 .. application_count];
            nap$get_application_names ($type_of_applications [nac$server_application], applications^,
                  application_count, status);
            IF NOT status.normal THEN
              EXIT /generate_definition/;
            IFEND;
            FOR application_index := 1 TO application_count DO
              generate_installed_server_def (applications^ [application_index].name, status);
              IF NOT status.normal THEN
                EXIT /generate_definition/;
              IFEND;
            FOREND;
          ELSE
            osp$set_status_abnormal (nac$status_id, nae$application_not_defined, 'server', status);
          IFEND;
          EXIT /generate_definition/;
        = clc$name =
          generate_installed_server_def (server_ptr^.element_value^.name_value, status);
          IF NOT status.normal THEN
            EXIT /generate_definition/;
          IFEND;
        CASEND;

        server_ptr := server_ptr^.link;

      WHILEND;
    END /generate_definition/;

    fsp$close_file (output_file_id, local_status);
    IF (NOT local_status.normal) AND status.normal THEN
      status := local_status;
    IFEND;

  PROCEND generate_server_definition;
?? OLDTITLE ??
?? NEWTITLE := 'generate_tcpip_definition', EJECT ??

  PROCEDURE generate_tcpip_definition
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE generate_tcpip_definition_pdt (
{       application, a: list of any of key
{           all
{         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 .. 5] 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 .. 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,
        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,
    [89, 6, 1, 9, 40, 34, 594],
    clc$command, 5, 3, 0, 0, 0, 0, 3, ''], [
    ['A                              ',clc$abbreviation_entry, 1],
    ['APPLICATION                    ',clc$nominal_entry, 1],
    ['O                              ',clc$abbreviation_entry, 2],
    ['OUTPUT                         ',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$optional_default_parameter, 0, 3],
{ PARAMETER 2
    [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, 3,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 3
    [5, 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], [69, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['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$application = 1,
      p$output = 2,
      p$status = 3;

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


    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      ignore_status: ost$status,
      local_status: ost$status,
      tcpip_index_ptr: ^clt$data_value;

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

      VAR
        ignore_status: ost$status;

      fsp$close_file (output_file_id, ignore_status);

    PROCEND exit_condition_handler;

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

    pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    process_output_file (pvt [p$output].value^.file_value^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  /generate_definition/
    BEGIN
      tcpip_index_ptr := pvt [p$application].value;
      WHILE tcpip_index_ptr <> NIL DO
        CASE tcpip_index_ptr^.element_value^.kind OF
        = clc$keyword =
          nap$get_application_names ($type_of_applications [nac$tcpip_application], application,
                application_count, status);
          IF NOT status.normal THEN
            EXIT /generate_definition/;
          IFEND;
          IF application_count > 0 THEN
            PUSH applications: [1 .. application_count];
            nap$get_application_names ($type_of_applications [nac$tcpip_application], applications^,
                  application_count, status);
            IF NOT status.normal THEN
              EXIT /generate_definition/;
            IFEND;
            FOR application_index := 1 TO application_count DO
              generate_installed_tcpip_def (applications^ [application_index].name, status);
              IF NOT status.normal THEN
                EXIT /generate_definition/;
              IFEND;
            FOREND;
          ELSE
            osp$set_status_abnormal (nac$status_id, nae$application_not_defined, 'tcpip', status);
          IFEND;
          EXIT /generate_definition/;
        = clc$name =
          generate_installed_tcpip_def (tcpip_index_ptr^.element_value^.name_value, status);
          IF NOT status.normal THEN
            EXIT /generate_definition/;
          IFEND;
        ELSE
        CASEND;
        tcpip_index_ptr := tcpip_index_ptr^.link;
      WHILEND;
    END /generate_definition/;

    fsp$close_file (output_file_id, local_status);
    IF (NOT local_status.normal) AND status.normal THEN
      status := local_status;
    IFEND;

  PROCEND generate_tcpip_definition;
?? OLDTITLE ??
?? NEWTITLE := 'quit', EJECT ??

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

{ PURPOSE: This procedure is the command processor for the MANNA quit command.
{ DESIGN:

{ PROCEDURE quit_pdt (
{   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,
    [89, 7, 10, 15, 19, 34, 604],
    clc$command, 1, 1, 0, 0, 0, 0, 1, ''], [
    ['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;


    VAR
      ignore_status: ost$status;

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    clp$end_include (utility_name, ignore_status);
    clp$close_display (output_control, ignore_status);

  PROCEND quit;

?? OLDTITLE ??
?? OLDTITLE ??
?? NEWTITLE := 'Subcommand Processors' ??
?? NEWTITLE := 'add_client_address', EJECT ??

  PROCEDURE add_client_address
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE add_client_addr_pdt (
{     network_identifier, ni: any of key
{           all
{         keyend
{         integer 1 .. 0ffffffff(16)
{         anyend = all
{     system_identifier, si: any of key
{           cdcnet,
{           nosve,
{           all
{         keyend
{         integer 1 .. 0ffffffffffff(16)
{         anyend = all
{     application_identifier, ai: any of key
{           all
{         keyend
{         integer 2000 .. 3000
{         anyend = all
{     status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 7] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] 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 .. 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$integer_type_qualifier,
        recend,
        default_value: string (3),
      recend,
      type2: 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 .. 3] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        default_value: string (3),
      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 .. 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$integer_type_qualifier,
        recend,
        default_value: string (3),
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [90, 7, 25, 8, 7, 11, 298],
    clc$command, 7, 4, 0, 0, 0, 0, 4, ''], [
    ['AI                             ',clc$abbreviation_entry, 3],
    ['APPLICATION_IDENTIFIER         ',clc$nominal_entry, 3],
    ['NETWORK_IDENTIFIER             ',clc$nominal_entry, 1],
    ['NI                             ',clc$abbreviation_entry, 1],
    ['SI                             ',clc$abbreviation_entry, 2],
    ['STATUS                         ',clc$nominal_entry, 4],
    ['SYSTEM_IDENTIFIER              ',clc$nominal_entry, 2]],
    [
{ 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, 84, clc$optional_default_parameter, 0, 3],
{ 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, 158, clc$optional_default_parameter, 0, 3],
{ 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, 84, clc$optional_default_parameter, 0, 3],
{ PARAMETER 4
    [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$integer_type,
    clc$keyword_type],
    FALSE, 2],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
      ],
    20, [[1, 0, clc$integer_type], [1, 0ffffffff(16), 10]]
    ,
    'all'],
{ PARAMETER 2
    [[1, 0, clc$union_type], [[clc$integer_type,
    clc$keyword_type],
    FALSE, 2],
    118, [[1, 0, clc$keyword_type], [3], [
      ['ALL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 3],
      ['CDCNET                         ', clc$nominal_entry,
  clc$normal_usage_entry, 1],
      ['NOSVE                          ', clc$nominal_entry,
  clc$normal_usage_entry, 2]]
      ],
    20, [[1, 0, clc$integer_type], [1, 0ffffffffffff(16), 10]]
    ,
    'all'],
{ PARAMETER 3
    [[1, 0, clc$union_type], [[clc$integer_type,
    clc$keyword_type],
    FALSE, 2],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
      ],
    20, [[1, 0, clc$integer_type], [2000, 3000, 10]]
    ,
    'all'],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$network_identifier = 1,
      p$system_identifier = 2,
      p$application_identifier = 3,
      p$status = 4;

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


    VAR
      i: integer,
      new_address_list: ^array [1 .. * ] of nat$client_address,
      new_address_count: integer,
      old_address_count: integer,
      value: clt$value;

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

    IF client_addresses = NIL THEN
      old_address_count := 0;
    ELSE
      old_address_count := UPPERBOUND (client_addresses^);
    IFEND;
    new_address_count := old_address_count + 1;
    ALLOCATE new_address_list: [1 .. new_address_count];
    FOR i := 1 TO old_address_count DO
      new_address_list^ [i] := client_addresses^ [i];
    FOREND;

    CASE pvt [p$network_identifier].value^.kind OF
    = clc$keyword =
      new_address_list^ [new_address_count].network_id := 0;
    = clc$integer =
      new_address_list^ [new_address_count].network_id := pvt [p$network_identifier].value^.integer_value.
            value;
    CASEND;

    CASE pvt [p$system_identifier].value^.kind OF
    = clc$keyword =
      IF pvt [p$system_identifier].value^.keyword_value = all_keyword THEN
        new_address_list^ [new_address_count].system_kind := nac$any_system_kind;
        new_address_list^ [new_address_count].system_id := 0;
      ELSEIF pvt [p$system_identifier].value^.keyword_value = 'NOSVE' THEN
        new_address_list^ [new_address_count].system_kind := nac$nosve_system_kind;
        new_address_list^ [new_address_count].system_id := 0;
      ELSE
        new_address_list^ [new_address_count].system_kind := nac$cdcnet_system_kind;
        new_address_list^ [new_address_count].system_id := 0;
      IFEND;
    = clc$integer =
      new_address_list^ [new_address_count].system_kind := nac$any_system_kind;
      new_address_list^ [new_address_count].system_id := pvt [p$system_identifier].value^.integer_value.value;
    CASEND;

    CASE pvt [p$application_identifier].value^.kind OF
    = clc$keyword =
      new_address_list^ [new_address_count].reserved_application_id := FALSE;
      new_address_list^ [new_address_count].application_id := 0;
    = clc$integer =
      new_address_list^ [new_address_count].reserved_application_id := TRUE;
      new_address_list^ [new_address_count].application_id :=
            pvt [p$application_identifier].value^.integer_value.value;
    CASEND;

    IF client_addresses <> NIL THEN
      FREE client_addresses;
    IFEND;
    client_addresses := new_address_list;

    definition_changed := TRUE;

  PROCEND add_client_address;
?? OLDTITLE ??
?? NEWTITLE := 'add_server_managed_titles', EJECT ??

  PROCEDURE add_server_managed_titles
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE add_serv_man_titles (
{     title_patterns, title_pattern, tp: list of any of
{         string 1..255
{         name
{         anyend = $required
{     status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        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$string_type_qualifier,
          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,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [91, 9, 30, 17, 7, 49, 994],
    clc$command, 4, 2, 1, 0, 0, 0, 2, ''], [
    ['STATUS                         ',clc$nominal_entry, 2],
    ['TITLE_PATTERN                  ',clc$alias_entry, 1],
    ['TITLE_PATTERNS                 ',clc$nominal_entry, 1],
    ['TP                             ',clc$abbreviation_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, 49, clc$required_parameter, 0, 0],
{ 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$list_type], [33, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$union_type], [[clc$name_type,
      clc$string_type],
      TRUE, 2],
      8, [[1, 0, clc$string_type], [1, 255, FALSE]],
      5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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


    VAR
      count_ptr: ^clt$data_value,
      display_status: ost$status,
      i: integer,
      j: integer,
      new_title_pattern_count: integer,
      new_title_pattern_list: ^nat$title_pattern_list,
      old_title_pattern_count: integer,
      title_pattern: string (nac$max_title_pattern_length),
      title_pattern_count: integer,
      title_ptr: ^clt$data_value,
      warnings_given: boolean,
      valid_title_patterns: ^nat$title_pattern_list,
      valid_title_pattern_count: integer;

    warnings_given := FALSE;
    status.normal := TRUE;
    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF server_managed_titles = NIL THEN
      old_title_pattern_count := 0;
    ELSE
      old_title_pattern_count := UPPERBOUND (server_managed_titles^);
    IFEND;
    valid_title_pattern_count := 0;
    new_title_pattern_count := 0;
    count_ptr := pvt [p$title_patterns].value;
    WHILE count_ptr <> NIL DO
      new_title_pattern_count := new_title_pattern_count + 1;
      count_ptr := count_ptr^.link;
    WHILEND;

    PUSH valid_title_patterns: [1 .. new_title_pattern_count];

    title_ptr := pvt [p$title_patterns].value;

  /validate_titles/
    WHILE title_ptr <> NIL DO
      CASE title_ptr^.element_value^.kind OF
      = clc$name =
        title_pattern := title_ptr^.element_value^.name_value;
      = clc$string =
        title_pattern := title_ptr^.element_value^.string_value^;
      CASEND;
      FOR j := 1 TO old_title_pattern_count DO
        IF title_pattern = server_managed_titles^ [j] THEN
          osp$set_status_abnormal (nac$status_id, nae$duplicate_title_pattern, 'Add_server_managed_titles',
                display_status);
          osp$append_status_parameter (osc$status_parameter_delimiter, title_pattern, display_status);
          osp$append_status_parameter (osc$status_parameter_delimiter, application_name, display_status);
          display_message (display_status, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
          warnings_given := TRUE;
          title_ptr := title_ptr^.link;
          CYCLE /validate_titles/;
        IFEND;
      FOREND;
      valid_title_pattern_count := valid_title_pattern_count + 1;
      valid_title_patterns^ [valid_title_pattern_count] := title_pattern;

      title_ptr := title_ptr^.link;

    WHILEND /validate_titles/;
    ALLOCATE new_title_pattern_list: [1 .. old_title_pattern_count + valid_title_pattern_count];
    FOR i := 1 TO old_title_pattern_count DO
      new_title_pattern_list^ [i] := server_managed_titles^ [i];
    FOREND;
    FOR i := 1 TO valid_title_pattern_count DO
      new_title_pattern_list^ [i + old_title_pattern_count] := valid_title_patterns^ [i];
    FOREND;
    IF server_managed_titles <> NIL THEN
      FREE server_managed_titles;
    IFEND;
    server_managed_titles := new_title_pattern_list;

    definition_changed := valid_title_pattern_count > 0;
    IF warnings_given THEN
      osp$set_status_abnormal (nac$status_id, nae$warnings_processing_command, 'ADD_SERVER_MANAGED_TITLES',
            status);
    IFEND;

  PROCEND add_server_managed_titles;
?? OLDTITLE ??
?? NEWTITLE := 'add_titles', EJECT ??

  PROCEDURE add_titles
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE add_titles_pdt (
{     titles, title, t: list of any of
{         string 1..255
{         name
{       anyend = $required
{     broadcast_registration, br: boolean = FALSE
{     priority, p: integer 1..255 = 1
{     data, d: string 1..32
{     status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 10] of clt$pdt_parameter_name,
      parameters: array [1 .. 5] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        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$string_type_qualifier,
          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,
      recend,
      type2: record
        header: clt$type_specification_header,
        default_value: string (5),
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
        default_value: string (1),
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$string_type_qualifier,
      recend,
      type5: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [91, 9, 30, 17, 8, 10, 22],
    clc$command, 10, 5, 1, 0, 0, 0, 5, ''], [
    ['BR                             ',clc$abbreviation_entry, 2],
    ['BROADCAST_REGISTRATION         ',clc$nominal_entry, 2],
    ['D                              ',clc$abbreviation_entry, 4],
    ['DATA                           ',clc$nominal_entry, 4],
    ['P                              ',clc$abbreviation_entry, 3],
    ['PRIORITY                       ',clc$nominal_entry, 3],
    ['STATUS                         ',clc$nominal_entry, 5],
    ['T                              ',clc$abbreviation_entry, 1],
    ['TITLE                          ',clc$alias_entry, 1],
    ['TITLES                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [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, 49, clc$required_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, 3, clc$optional_default_parameter, 0, 5],
{ PARAMETER 3
    [6, 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_default_parameter, 0, 1],
{ PARAMETER 4
    [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, 8, clc$optional_parameter, 0, 0],
{ PARAMETER 5
    [7, 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], [33, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$union_type], [[clc$name_type,
      clc$string_type],
      TRUE, 2],
      8, [[1, 0, clc$string_type], [1, 255, FALSE]],
      5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$boolean_type],
    'FALSE'],
{ PARAMETER 3
    [[1, 0, clc$integer_type], [1, 255, 10],
    '1'],
{ PARAMETER 4
    [[1, 0, clc$string_type], [1, 32, FALSE]],
{ PARAMETER 5
    [[1, 0, clc$status_type]]];

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

    CONST
      p$titles = 1,
      p$broadcast_registration = 2,
      p$priority = 3,
      p$data = 4,
      p$status = 5;

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

    VAR
      data_length: nat$directory_data_length,
      display_status: ost$status,
      distribute: clt$value,
      distribute_titles: boolean,
      i: integer,
      ignore_status: ost$status,
      j: integer,
      new_title_count: integer,
      new_title_list: ^array [1 .. * ] of nat$selected_title,
      old_title_count: integer,
      parameter_specified: boolean,
      title: string (nac$max_title_length),
      title_count: integer,
      title_priority: nat$directory_priority,
      titles_ptr: ^clt$data_value,
      warnings_given: boolean,
      valid_titles: ^array [1 .. * ] of nat$selected_title,
      valid_title_count: integer;

    warnings_given := FALSE;
    status.normal := TRUE;
    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    distribute_titles := pvt [p$broadcast_registration].value^.boolean_value.value;

    title_priority := pvt [p$priority].value^.integer_value.value;

    IF pvt [p$data].specified THEN
      data_length := STRLENGTH (pvt [p$data].value^.string_value^);
    ELSE
      data_length := 0;
    IFEND;

    IF selected_titles = NIL THEN
      old_title_count := 0;
    ELSE
      old_title_count := UPPERBOUND (selected_titles^);
    IFEND;
    valid_title_count := 0;

    new_title_count := 0;
    titles_ptr := pvt [p$titles].value;
    WHILE titles_ptr <> NIL DO
      new_title_count := new_title_count + 1;
      titles_ptr := titles_ptr^.link;
    WHILEND;

    PUSH valid_titles: [1 .. new_title_count];

    titles_ptr := pvt [p$titles].value;

  /validate_titles/
    WHILE titles_ptr <> NIL DO
      CASE titles_ptr^.element_value^.kind OF
      = clc$name =
        title := titles_ptr^.element_value^.name_value;
      = clc$string =
        title := titles_ptr^.element_value^.string_value^;
      CASEND;

      FOR j := 1 TO old_title_count DO
        IF title = selected_titles^ [j].title THEN
          osp$set_status_abnormal (nac$status_id, nae$duplicate_title, 'Add_titles', display_status);
          osp$append_status_parameter (osc$status_parameter_delimiter, title, display_status);
          osp$append_status_parameter (osc$status_parameter_delimiter, application_name, display_status);
          display_message (display_status, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
          warnings_given := TRUE;
          titles_ptr := titles_ptr^.link;
          CYCLE /validate_titles/;
        IFEND;
      FOREND;
      valid_title_count := valid_title_count + 1;
      valid_titles^ [valid_title_count].title := title;
      valid_titles^ [valid_title_count].distribute_title := distribute_titles;
      valid_titles^ [valid_title_count].priority := title_priority;
      valid_titles^ [valid_title_count].data_length := data_length;
      IF data_length > 0 THEN
        i#move (pvt [p$data].value^.string_value, ^valid_titles^ [valid_title_count].data, data_length);
      IFEND;

      titles_ptr := titles_ptr^.link;

    WHILEND /validate_titles/;
    ALLOCATE new_title_list: [1 .. old_title_count + valid_title_count];
    FOR i := 1 TO old_title_count DO
      new_title_list^ [i] := selected_titles^ [i];
    FOREND;
    FOR i := 1 TO valid_title_count DO
      new_title_list^ [i + old_title_count] := valid_titles^ [i];
    FOREND;
    IF selected_titles <> NIL THEN
      FREE selected_titles;
    IFEND;
    selected_titles := new_title_list;

    selected_titles_changed := valid_title_count > 0;
    definition_changed := selected_titles_changed;

    IF warnings_given THEN
      osp$set_status_abnormal (nac$status_id, nae$warnings_processing_command, 'ADD_TITLES', status);
    IFEND;

  PROCEND add_titles;
?? OLDTITLE ??
?? NEWTITLE := 'change_accept_connection', EJECT ??

  PROCEDURE change_accept_connection
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE change_accept_con_pdt (
{     accept_connection, ac: boolean =$required
{     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,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 10, 14, 15, 13, 810],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['AC                             ',clc$abbreviation_entry, 1],
    ['ACCEPT_CONNECTION              ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ 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, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [3, 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]],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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


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

    accept_connection := pvt [p$accept_connection].value^.boolean_value.value;

    definition_changed := TRUE;

  PROCEND change_accept_connection;
?? OLDTITLE ??
?? NEWTITLE := 'change_application_identifier', EJECT ??

  PROCEDURE change_application_identifier
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE change_appl_id_pdt (
{     application_identifier, ai: any of key
{           (variable, v)
{         keyend
{         integer 2000 .. 3000
{         anyend = $required
{     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,
        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 .. 2] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 10, 14, 15, 16, 292],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['AI                             ',clc$abbreviation_entry, 1],
    ['APPLICATION_IDENTIFIER         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ 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, 121,
  clc$required_parameter, 0, 0],
{ PARAMETER 2
    [3, 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$integer_type, clc$keyword_type],
    FALSE, 2],
    81, [[1, 0, clc$keyword_type], [2], [
      ['V                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
      ['VARIABLE                       ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ],
    20, [[1, 0, clc$integer_type], [2000, 3000, 10]]
    ],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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


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

    CASE pvt [p$application_identifier].value^.kind OF
    = clc$keyword =
      IF (utility_state = changing_server) OR (utility_state = changing_client) THEN
        IF NOT reserved_application_id THEN
          osp$set_status_condition (nae$application_id_not_changed, status);
          RETURN;
        IFEND;
      IFEND;
      reserved_application_id := FALSE;
      application_id := 0;
    = clc$integer =
      nap$verify_application_id (pvt [p$application_identifier].value^.integer_value.value, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      application_id := pvt [p$application_identifier].value^.integer_value.value;
      reserved_application_id := TRUE;
    CASEND;

    definition_changed := TRUE;

  PROCEND change_application_identifier;
?? OLDTITLE ??
?? NEWTITLE := 'change_client_info_source', EJECT ??

  PROCEDURE change_client_info_source
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE change_client_info_pdt (
{     source, s: list 1 .. 2 of key
{          (dialog, d)
{          (connect_data, cd)
{         keyend = $required
{     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,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 4] of clt$keyword_specification,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 10, 14, 15, 19, 288],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['S                              ',clc$abbreviation_entry, 1],
    ['SOURCE                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ 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, 171,
  clc$required_parameter, 0, 0],
{ PARAMETER 2
    [3, 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], [155, 1, 2, FALSE],
      [[1, 0, clc$keyword_type], [4], [
      ['CD                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
      ['CONNECT_DATA                   ', clc$nominal_entry, clc$normal_usage_entry, 2],
      ['D                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
      ['DIALOG                         ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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

    VAR
      source_ptr: ^clt$data_value;

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

    source_ptr := pvt [p$source].value;

    WHILE source_ptr <> NIL DO
      IF source_ptr^.element_value^.keyword_value (1) = 'D' THEN
        client_info_source := nac$client_info_via_dialog;
        definition_changed := TRUE;
      ELSE
        osp$set_status_abnormal (nac$status_id, nae$value_not_supported, 'connection_data', status);

{       client_info_source := nac$client_info_via_conn_data;

      IFEND;
      source_ptr := source_ptr^.link;
    WHILEND;

  PROCEND change_client_info_source;
?? OLDTITLE ??
?? NEWTITLE := 'change_client_server_validation', EJECT ??

  PROCEDURE change_client_server_validation
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE change_client_val_pdt (
{     capability, c: any of key
{         none
{       keyend
{       name
{       anyend = $required
{     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,
        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,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 10, 14, 15, 22, 170],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['C                              ',clc$abbreviation_entry, 1],
    ['CAPABILITY                     ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ 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, 69, clc$required_parameter,
  0, 0],
{ PARAMETER 2
    [3, 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],
    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 2
    [[1, 0, clc$status_type]]];

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

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

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


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

    CASE pvt [p$capability].value^.kind OF
    = clc$keyword =
      client_capability := osc$null_name;
    = clc$name =
      client_capability := pvt [p$capability].value^.name_value;
    CASEND;
    definition_changed := TRUE;

  PROCEND change_client_server_validation;
?? OLDTITLE ??
?? NEWTITLE := 'change_client_validation', EJECT ??

  PROCEDURE change_client_validation
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE change_client_val_pdt (
{     capability, c: any of key
{         none
{       keyend
{       name
{       anyend
{     ring, r: integer 1 .. 15
{     system_privilege, sp: boolean
{     status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 7] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] 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 .. 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,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 10, 14, 15, 25, 922],
    clc$command, 7, 4, 0, 0, 0, 0, 4, ''], [
    ['C                              ',clc$abbreviation_entry, 1],
    ['CAPABILITY                     ',clc$nominal_entry, 1],
    ['R                              ',clc$abbreviation_entry, 2],
    ['RING                           ',clc$nominal_entry, 2],
    ['SP                             ',clc$abbreviation_entry, 3],
    ['STATUS                         ',clc$nominal_entry, 4],
    ['SYSTEM_PRIVILEGE               ',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, 69, clc$optional_parameter,
  0, 0],
{ PARAMETER 2
    [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, 20, clc$optional_parameter,
  0, 0],
{ PARAMETER 3
    [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_parameter, 0
  , 0],
{ PARAMETER 4
    [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$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 2
    [[1, 0, clc$integer_type], [1, 15, 10]],
{ PARAMETER 3
    [[1, 0, clc$boolean_type]],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$capability = 1,
      p$ring = 2,
      p$system_privilege = 3,
      p$status = 4;

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

    VAR
      parameter_specified: boolean;

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

    IF pvt [p$capability].specified THEN
      CASE pvt [p$capability].value^.kind OF
      = clc$keyword =
        capability := osc$null_name;
      = clc$name =
        capability := pvt [p$capability].value^.name_value;
      CASEND;
      definition_changed := TRUE;
    IFEND;

    IF pvt [p$ring].specified THEN
      ring := pvt [p$ring].value^.integer_value.value;
      definition_changed := TRUE;
    IFEND;

    IF pvt [p$system_privilege].specified THEN
      system_privilege := pvt [p$system_privilege].value^.boolean_value.value;
      definition_changed := TRUE;
    IFEND;

  PROCEND change_client_validation;
?? OLDTITLE ??
?? NEWTITLE := 'change_connection_priority', EJECT ??

  PROCEDURE change_connection_priority
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE change_conn_priority_pdt (
{     connection_priority, cp: integer 0 .. 11 = $required
{     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,
        qualifier: clt$integer_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 10, 14, 15, 29, 573],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['CONNECTION_PRIORITY            ',clc$nominal_entry, 1],
    ['CP                             ',clc$abbreviation_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [1, 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$required_parameter,
  0, 0],
{ PARAMETER 2
    [3, 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$integer_type], [0, 11, 10]],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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


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

    connection_priority := pvt [p$connection_priority].value^.integer_value.value;

    definition_changed := TRUE;

  PROCEND change_connection_priority;
?? OLDTITLE ??
?? NEWTITLE := 'change_maximum_connections', EJECT ??

  PROCEDURE change_maximum_connections
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE change_max_connect_pdt (
{     maximum_connections, mc: integer 1 .. 0ffff(16) = $required
{     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,
        qualifier: clt$integer_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 10, 14, 15, 32, 283],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['MAXIMUM_CONNECTIONS            ',clc$nominal_entry, 1],
    ['MC                             ',clc$abbreviation_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [1, 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$required_parameter,
  0, 0],
{ PARAMETER 2
    [3, 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$integer_type], [1, 0ffff(16), 10]],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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

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

    max_connections := pvt [p$maximum_connections].value^.integer_value.value;

    definition_changed := TRUE;

  PROCEND change_maximum_connections;
?? OLDTITLE ??
?? NEWTITLE := 'change_maximum_sockets', EJECT ??

  PROCEDURE change_maximum_sockets
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE change_max_sockets_pdt (
{       maximum_sockets, ms: integer 1 .. 0ffff(16) = $required
{       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,
        qualifier: clt$integer_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 1, 9, 40, 27, 388],
    clc$command, 3, 2, 1, 0, 0, 0, 2, ''], [
    ['MAXIMUM_SOCKETS                ',clc$nominal_entry, 1],
    ['MS                             ',clc$abbreviation_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [1, 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$required_parameter,
  0, 0],
{ PARAMETER 2
    [3, 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$integer_type], [1, 0ffff(16), 10]],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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


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

    max_sockets := pvt [p$maximum_sockets].value^.integer_value.value;

    definition_changed := TRUE;

  PROCEND change_maximum_sockets;
?? OLDTITLE ??
?? NEWTITLE := 'change_server_job', EJECT ??

  PROCEDURE change_server_job
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE change_server_job_pdt (
{     job, j: file
{     validation_source, vs: key
{         (client, c)
{         (server, s)
{       keyend
{     maximum_connections, mc: integer 1 .. 0ffff(16)
{     include_commands_until, icu: string = '**'
{     status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 9] of clt$pdt_parameter_name,
      parameters: array [1 .. 5] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 4] of clt$keyword_specification,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$string_type_qualifier,
        default_value: string (4),
      recend,
      type5: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 10, 14, 15, 34, 787],
    clc$command, 9, 5, 0, 0, 0, 0, 5, ''], [
    ['ICU                            ',clc$abbreviation_entry, 4],
    ['INCLUDE_COMMANDS_UNTIL         ',clc$nominal_entry, 4],
    ['J                              ',clc$abbreviation_entry, 1],
    ['JOB                            ',clc$nominal_entry, 1],
    ['MAXIMUM_CONNECTIONS            ',clc$nominal_entry, 3],
    ['MC                             ',clc$abbreviation_entry, 3],
    ['STATUS                         ',clc$nominal_entry, 5],
    ['VALIDATION_SOURCE              ',clc$nominal_entry, 2],
    ['VS                             ',clc$abbreviation_entry, 2]],
    [
{ PARAMETER 1
    [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, 3, clc$optional_parameter, 0
  , 0],
{ PARAMETER 2
    [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, 155,
  clc$optional_parameter, 0, 0],
{ PARAMETER 3
    [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, 20, clc$optional_parameter,
  0, 0],
{ PARAMETER 4
    [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_default_parameter, 0, 4],
{ PARAMETER 5
    [7, 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]],
{ PARAMETER 2
    [[1, 0, clc$keyword_type], [4], [
    ['C                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['CLIENT                         ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['S                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['SERVER                         ', clc$nominal_entry, clc$normal_usage_entry, 2]]
    ],
{ PARAMETER 3
    [[1, 0, clc$integer_type], [1, 0ffff(16), 10]],
{ PARAMETER 4
    [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE],
    '''**'''],
{ PARAMETER 5
    [[1, 0, clc$status_type]]];

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

    CONST
      p$job = 1,
      p$validation_source = 2,
      p$maximum_connections = 3,
      p$include_commands_until = 4,
      p$status = 5;

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


    VAR
      chasj_prompt_string: [STATIC, READ] string (ifc$def_prompt_string_size) := ifc$def_prompt_string_value,
      default_ring_attributes: amt$ring_attributes,
      device_assigned: boolean,
      device_class: rmt$device_class,
      display_control: clt$display_control,
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      file: clt$file,
      ignore_status: ost$status,
      input_block_handle: clt$block_handle,
      input_executable: boolean,
      input_file_id: amt$file_identifier,
      interactive: boolean,
      line: ^clt$command_line,
      local_status: ost$status,
      parameter_specified: boolean,
      unique_name: ost$name,
      until_string: ^string ( * );

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

      VAR
        ignore_status: ost$status;

      clp$close_display (display_control, ignore_status);
      clp$pop_input (TRUE, input_block_handle, input_file_id, input_executable, NIL, ignore_status)

    PROCEND exit_condition_handler;

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

    IF NOT nam_initiated THEN
      osp$set_status_abnormal (nac$status_id, nae$command_not_allowed, 'CHANGE_SERVER_JOB', status);
      osp$append_status_parameter (osc$status_parameter_delimiter, 'server is not initiated by NAM', status);
      RETURN;
    IFEND;

    IF pvt [p$validation_source].specified THEN
      IF pvt [p$validation_source].value^.keyword_value (1) = 'S' THEN
        server_job_validation_source := nac$server_job;
      ELSE
        server_job_validation_source := nac$client;
      IFEND;
      definition_changed := TRUE;
    IFEND;

    IF pvt [p$maximum_connections].specified THEN
      server_job_max_connections := pvt [p$maximum_connections].value^.integer_value.value;
      definition_changed := TRUE;
    IFEND;

    IF pvt [p$job].specified THEN
      rmp$get_device_class (pvt [p$job].value^.file_value^, device_assigned, device_class, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      IF device_class <> rmc$null_device THEN
        PUSH until_string: [#SIZE (pvt [p$include_commands_until].value^.string_value^)];
        until_string^ := pvt [p$include_commands_until].value^.string_value^;

        input_block_handle := clv$nil_block_handle;
        input_file_id := amv$nil_file_identifier;
        display_control := clv$nil_display_control;
        #SPOIL (input_block_handle, input_file_id, display_control);
        pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);

      /open_output_file/
        BEGIN
          default_ring_attributes.r1 := #RING (^default_ring_attributes);
          default_ring_attributes.r2 := #RING (^default_ring_attributes);
          default_ring_attributes.r3 := #RING (^default_ring_attributes);

          pmp$get_unique_name (unique_name, ignore_status);
          file.local_file_name := unique_name;
          clp$open_display_file (file, NIL, fsc$legible_data, default_ring_attributes, display_control,
                status);
          IF NOT status.normal THEN
            EXIT /open_output_file/;
          IFEND;

        END /open_output_file/;

        IF NOT status.normal THEN
          clp$get_command_origin (interactive, local_status);
          IF interactive THEN
            RETURN;
          IFEND;
        IFEND;
        clp$push_input (pvt [p$job].value^.file_value^, osc$null_name, '', FALSE, TRUE, input_block_handle,
              input_file_id, input_executable, local_status);
        IF NOT local_status.normal THEN
          IF status.normal THEN
            status := local_status;
          IFEND;
          RETURN;
        IFEND;

      /collect_commands/
        WHILE TRUE DO
          clp$get_line_from_command_file (chasj_prompt_string, line, local_status);
          IF status.normal AND (NOT local_status.normal) THEN
            status := local_status;
          IFEND;
          IF NOT local_status.normal THEN
            EXIT /collect_commands/;
          ELSEIF line = NIL THEN

{  eoi encountered

            EXIT /collect_commands/;
          ELSEIF (STRLENGTH (line^) = STRLENGTH (until_string^)) AND (line^ = until_string^) THEN
            EXIT /collect_commands/;
          ELSEIF display_control.file_id <> amv$nil_file_identifier THEN
            clp$put_display (display_control, line^, clc$no_trim, local_status);
            IF NOT local_status.normal THEN
              IF status.normal THEN
                status := local_status;
              IFEND;
              clp$close_display (display_control, ignore_status);
            IFEND;
          IFEND;
        WHILEND /collect_commands/;

        clp$pop_input (TRUE, input_block_handle, input_file_id, input_executable, NIL, local_status);
        IF status.normal AND (NOT local_status.normal) THEN
          status := local_status;
        IFEND;
        IF display_control.file_id <> amv$nil_file_identifier THEN
          clp$close_display (display_control, local_status);
          IF status.normal AND (NOT local_status.normal) THEN
            status := local_status;
          IFEND;
        IFEND;
        IF status.normal THEN
          server_job := unique_name;
        IFEND;
        pmp$disestablish_cond_handler (exit_condition, ignore_status);
      IFEND;

      IF (utility_state = changing_server) THEN
        server_job_specified := TRUE;
        IF (device_class = rmc$null_device) THEN
          IF server_job = clc$null_file THEN
            server_job_changed := FALSE;
          ELSE
            server_job := clc$null_file;
            server_job_changed := TRUE;
          IFEND;
        ELSE
          server_job_changed := TRUE;
        IFEND;
        definition_changed := server_job_changed;
      IFEND;

    IFEND;

  PROCEND change_server_job;
?? OLDTITLE ??
?? NEWTITLE := 'change_server_validation', EJECT ??

  PROCEDURE change_server_validation
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE change_server_val_pdt (
{     capability, c: any of key
{         none
{       keyend
{       name
{       anyend
{     ring, r: integer 1 .. 15
{     system_privilege, sp: boolean
{     status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 7] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] 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 .. 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,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 10, 14, 15, 39, 387],
    clc$command, 7, 4, 0, 0, 0, 0, 4, ''], [
    ['C                              ',clc$abbreviation_entry, 1],
    ['CAPABILITY                     ',clc$nominal_entry, 1],
    ['R                              ',clc$abbreviation_entry, 2],
    ['RING                           ',clc$nominal_entry, 2],
    ['SP                             ',clc$abbreviation_entry, 3],
    ['STATUS                         ',clc$nominal_entry, 4],
    ['SYSTEM_PRIVILEGE               ',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, 69, clc$optional_parameter,
  0, 0],
{ PARAMETER 2
    [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, 20, clc$optional_parameter,
  0, 0],
{ PARAMETER 3
    [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_parameter, 0
  , 0],
{ PARAMETER 4
    [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$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 2
    [[1, 0, clc$integer_type], [1, 15, 10]],
{ PARAMETER 3
    [[1, 0, clc$boolean_type]],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$capability = 1,
      p$ring = 2,
      p$system_privilege = 3,
      p$status = 4;

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

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

    IF pvt [p$capability].specified THEN
      CASE pvt [p$capability].value^.kind OF
      = clc$keyword =
        capability := osc$null_name;
      = clc$name =
        capability := pvt [p$capability].value^.name_value;
      CASEND;
      definition_changed := TRUE;
    IFEND;

    IF pvt [p$ring].specified THEN
      ring := pvt [p$ring].value^.integer_value.value;
      definition_changed := TRUE;
    IFEND;

    IF pvt [p$system_privilege].specified THEN
      system_privilege := pvt [p$system_privilege].value^.boolean_value.value;
      definition_changed := TRUE;
    IFEND;

  PROCEND change_server_validation;
?? OLDTITLE ??
?? NEWTITLE := 'change_tcpip_validation', EJECT ??

  PROCEDURE change_tcpip_validation
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE change_tcpip_val_pdt (
{       capability, c: any of
{         key
{           none
{         keyend
{         name
{         anyend
{       ring, r: integer 1 .. 15
{       system_privilege, sp: boolean
{       status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 7] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] 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 .. 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,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 1, 9, 40, 28, 623],
    clc$command, 7, 4, 0, 0, 0, 0, 4, ''], [
    ['C                              ',clc$abbreviation_entry, 1],
    ['CAPABILITY                     ',clc$nominal_entry, 1],
    ['R                              ',clc$abbreviation_entry, 2],
    ['RING                           ',clc$nominal_entry, 2],
    ['SP                             ',clc$abbreviation_entry, 3],
    ['STATUS                         ',clc$nominal_entry, 4],
    ['SYSTEM_PRIVILEGE               ',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, 69, clc$optional_parameter,
  0, 0],
{ PARAMETER 2
    [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, 20, clc$optional_parameter,
  0, 0],
{ PARAMETER 3
    [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_parameter, 0
  , 0],
{ PARAMETER 4
    [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$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 2
    [[1, 0, clc$integer_type], [1, 15, 10]],
{ PARAMETER 3
    [[1, 0, clc$boolean_type]],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$capability = 1,
      p$ring = 2,
      p$system_privilege = 3,
      p$status = 4;

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


    VAR
      parameter_specified: boolean,
      value: clt$value;

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

    IF pvt [p$capability].specified THEN
      CASE pvt [p$capability].value^.kind OF
      = clc$keyword =
        capability := osc$null_name;
      = clc$name =
        capability := pvt [p$capability].value^.name_value;
      CASEND;
      definition_changed := TRUE;
    IFEND;

    IF pvt [p$ring].specified THEN
      ring := pvt [p$ring].value^.integer_value.value;
      definition_changed := TRUE;
    IFEND;

    IF pvt [p$system_privilege].specified THEN
      system_privilege := pvt [p$system_privilege].value^.boolean_value.value;
      definition_changed := TRUE;
    IFEND;

  PROCEND change_tcpip_validation;
?? OLDTITLE ??
?? NEWTITLE := 'delete_client_address', EJECT ??

  PROCEDURE delete_client_address
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE del_client_addr_pdt (
{     network_identifier, ni: any of key
{         all
{       keyend
{       integer 1 .. 0ffffffff(16)
{       anyend = all
{     system_identifier, si: any of key
{         cdcnet
{         nosve
{         all
{       keyend
{       integer 1 .. 0ffffffffffff(16)
{       anyend = all
{     application_identifier, ai: any of key
{         all
{       keyend
{       integer 2000 .. 3000
{       anyend = all
{     status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 7] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] 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 .. 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$integer_type_qualifier,
        recend,
        default_value: string (3),
      recend,
      type2: 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 .. 3] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        default_value: string (3),
      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 .. 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$integer_type_qualifier,
        recend,
        default_value: string (3),
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 23, 13, 46, 43, 157],
    clc$command, 7, 4, 0, 0, 0, 0, 4, ''], [
    ['AI                             ',clc$abbreviation_entry, 3],
    ['APPLICATION_IDENTIFIER         ',clc$nominal_entry, 3],
    ['NETWORK_IDENTIFIER             ',clc$nominal_entry, 1],
    ['NI                             ',clc$abbreviation_entry, 1],
    ['SI                             ',clc$abbreviation_entry, 2],
    ['STATUS                         ',clc$nominal_entry, 4],
    ['SYSTEM_IDENTIFIER              ',clc$nominal_entry, 2]],
    [
{ 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, 84,
  clc$optional_default_parameter, 0, 3],
{ 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, 158,
  clc$optional_default_parameter, 0, 3],
{ 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, 84,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 4
    [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$integer_type, clc$keyword_type],
    FALSE, 2],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ],
    20, [[1, 0, clc$integer_type], [1, 0ffffffff(16), 10]]
    ,
    'all'],
{ PARAMETER 2
    [[1, 0, clc$union_type], [[clc$integer_type, clc$keyword_type],
    FALSE, 2],
    118, [[1, 0, clc$keyword_type], [3], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 3],
      ['CDCNET                         ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['NOSVE                          ', clc$nominal_entry, clc$normal_usage_entry, 2]]
      ],
    20, [[1, 0, clc$integer_type], [1, 0ffffffffffff(16), 10]]
    ,
    'all'],
{ PARAMETER 3
    [[1, 0, clc$union_type], [[clc$integer_type, clc$keyword_type],
    FALSE, 2],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ],
    20, [[1, 0, clc$integer_type], [2000, 3000, 10]]
    ,
    'all'],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$network_identifier = 1,
      p$system_identifier = 2,
      p$application_identifier = 3,
      p$status = 4;

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


    VAR
      address_found: boolean,
      delete_address: nat$client_address,
      i: integer,
      new_address_list: ^array [1 .. * ] of nat$client_address,
      new_index: integer,
      old_address_count: integer;

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

    CASE pvt [p$network_identifier].value^.kind OF
    = clc$keyword =
      delete_address.network_id := 0;
    = clc$integer =
      delete_address.network_id := pvt [p$network_identifier].value^.integer_value.value;
    CASEND;

    CASE pvt [p$system_identifier].value^.kind OF
    = clc$keyword =
      IF pvt [p$system_identifier].value^.keyword_value = all_keyword THEN
        delete_address.system_kind := nac$any_system_kind;
        delete_address.system_id := 0;
      ELSEIF pvt [p$system_identifier].value^.name_value = 'NOSVE' THEN
        delete_address.system_kind := nac$nosve_system_kind;
        delete_address.system_id := 0;
      ELSE
        delete_address.system_kind := nac$cdcnet_system_kind;
        delete_address.system_id := 0;
      IFEND;
    = clc$integer =
      delete_address.system_kind := nac$any_system_kind;
      delete_address.system_id := pvt [p$system_identifier].value^.integer_value.value;
    CASEND;

    CASE pvt [p$application_identifier].value^.kind OF
    = clc$keyword =
      delete_address.reserved_application_id := FALSE;
      delete_address.application_id := 0;
    = clc$integer =
      delete_address.reserved_application_id := TRUE;
      delete_address.application_id := pvt [p$application_identifier].value^.integer_value.value;
    CASEND;

    address_found := FALSE;
    new_address_list := NIL;
    IF client_addresses <> NIL THEN
      old_address_count := UPPERBOUND (client_addresses^);
      IF old_address_count > 1 THEN
        ALLOCATE new_address_list: [1 .. old_address_count - 1];
      IFEND;
      new_index := 1;
      FOR i := 1 TO old_address_count DO
        IF client_addresses^ [i] = delete_address THEN
          address_found := TRUE;
        ELSEIF (new_address_list <> NIL) AND (new_index <= UPPERBOUND (new_address_list^)) THEN
          new_address_list^ [new_index] := client_addresses^ [i];
          new_index := new_index + 1;
        IFEND;
      FOREND;
    IFEND;

    IF address_found THEN
      FREE client_addresses;
      client_addresses := new_address_list;
      definition_changed := TRUE;
    ELSE
      osp$set_status_condition (nae$client_address_not_in_list, status);
      IF new_address_list <> NIL THEN
        FREE new_address_list;
      IFEND;
    IFEND;

  PROCEND delete_client_address;
?? OLDTITLE ??
?? NEWTITLE := 'end_change_client', EJECT ??

  PROCEDURE end_change_client
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE end_change_client_pdt (
{    save_definition, sd: 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,
    [89, 6, 23, 13, 46, 17, 572],
    clc$command, 3, 2, 0, 0, 0, 0, 2, ''], [
    ['SAVE_DEFINITION                ',clc$nominal_entry, 1],
    ['SD                             ',clc$abbreviation_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [1, 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
    [3, 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$save_definition = 1,
      p$status = 2;

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


    VAR
      ignore_status: ost$status,
      save: clt$value;

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

    IF pvt [p$save_definition].value^.boolean_value.value THEN
      IF definition_changed THEN
        nap$change_client (application_name, max_connections, connection_priority, reserved_application_id,
              application_id, capability, ring, system_privilege, status);
      ELSE
        osp$set_status_abnormal (nac$status_id, nae$appl_definition_not_changed, application_name, status);
        display_message (status, ignore_status);
        status.normal := TRUE;
      IFEND;
    IFEND;
    definition_changed := FALSE;

    IF status.normal THEN
      clp$end_include (change_client_utility_name, ignore_status);
    IFEND;

  PROCEND end_change_client;
?? OLDTITLE ??
?? NEWTITLE := 'end_change_server', EJECT ??

  PROCEDURE end_change_server
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE end_change_server_pdt (
{    save_definition, sd: 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,
    [89, 6, 23, 13, 46, 14, 949],
    clc$command, 3, 2, 0, 0, 0, 0, 2, ''], [
    ['SAVE_DEFINITION                ',clc$nominal_entry, 1],
    ['SD                             ',clc$abbreviation_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [1, 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
    [3, 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$save_definition = 1,
      p$status = 2;

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


    VAR
      ignore_status: ost$status,
      save: clt$value;

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

    IF pvt [p$save_definition].value^.boolean_value.value THEN
      IF definition_changed THEN
        nap$change_server (application_name, selected_titles_changed, selected_titles, server_managed_titles,
              max_connections, connection_priority, capability, ring, system_privilege, accept_connection,
              client_capability, client_info_source, client_addresses, reserved_application_id,
              application_id, server_job_changed, server_job, server_job_validation_source,
              server_job_max_connections, status);
      ELSE
        osp$set_status_abnormal (nac$status_id, nae$appl_definition_not_changed, application_name, status);
        display_message (status, ignore_status);
        status.normal := TRUE;
      IFEND;
    IFEND;
    definition_changed := FALSE;

    IF status.normal THEN
      clp$end_include (change_server_utility_name, ignore_status);
    IFEND;

  PROCEND end_change_server;
?? OLDTITLE ??
?? NEWTITLE := 'end_change_tcpip_application', EJECT ??

  PROCEDURE end_change_tcpip_application
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE end_change_tcpip_appl_pdt (
{       save_definition, sd: 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,
    [89, 6, 1, 9, 40, 33, 201],
    clc$command, 3, 2, 0, 0, 0, 0, 2, ''], [
    ['SAVE_DEFINITION                ',clc$nominal_entry, 1],
    ['SD                             ',clc$abbreviation_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [1, 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
    [3, 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$save_definition = 1,
      p$status = 2;

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


    VAR
      ignore_status: ost$status;

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

    IF pvt [p$save_definition].value^.boolean_value.value THEN
      IF definition_changed THEN
        nap$change_tcpip (application_name, max_sockets, capability, ring, system_privilege, status);
      ELSE
        osp$set_status_abnormal (nac$status_id, nae$appl_definition_not_changed, application_name, status);
        display_message (status, ignore_status);
        status.normal := TRUE;
      IFEND;
    IFEND;
    definition_changed := FALSE;

    IF status.normal THEN
      clp$end_include (change_tcpip_utility_name, ignore_status);
    IFEND;

  PROCEND end_change_tcpip_application;
?? OLDTITLE ??
?? NEWTITLE := 'end_define_client', EJECT ??

  PROCEDURE end_define_client
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE end_define_client_pdt (
{     save_definition, sd: 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,
    [89, 6, 23, 13, 46, 12, 504],
    clc$command, 3, 2, 0, 0, 0, 0, 2, ''], [
    ['SAVE_DEFINITION                ',clc$nominal_entry, 1],
    ['SD                             ',clc$abbreviation_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [1, 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
    [3, 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$save_definition = 1,
      p$status = 2;

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


    VAR
      ignore_status: ost$status,
      save: clt$value;

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

    IF pvt [p$save_definition].value^.boolean_value.value THEN
      nap$define_client (application_name, max_connections, connection_priority, protocol,
            reserved_application_id, application_id, capability, ring, system_privilege, status);
    IFEND;

    IF status.normal THEN
      clp$end_include (define_client_utility_name, ignore_status);
    IFEND;

  PROCEND end_define_client;
?? OLDTITLE ??
?? NEWTITLE := 'end_define_server', EJECT ??

  PROCEDURE end_define_server
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{  PROCEDURE end_define_server_pdt (
{     save_definition, sd: 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,
    [89, 6, 23, 13, 46, 10, 66],
    clc$command, 3, 2, 0, 0, 0, 0, 2, ''], [
    ['SAVE_DEFINITION                ',clc$nominal_entry, 1],
    ['SD                             ',clc$abbreviation_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [1, 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
    [3, 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$save_definition = 1,
      p$status = 2;

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

    VAR
      ignore_status: ost$status,
      save: clt$value;

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

    IF pvt [p$save_definition].value^.boolean_value.value THEN
      nap$define_server (application_name, selected_titles, server_managed_titles, max_connections,
            connection_priority, capability, ring, system_privilege, accept_connection, client_capability,
            client_info_source, client_addresses, reserved_application_id, application_id, protocol,
            nam_initiated, server_job, server_job_validation_source, server_job_max_connections, status);
    IFEND;

    IF status.normal THEN
      clp$end_include (define_server_utility_name, ignore_status);
    IFEND;

  PROCEND end_define_server;
?? OLDTITLE ??
?? NEWTITLE := 'end_define_tcpip_application', EJECT ??

  PROCEDURE end_define_tcpip_application
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE end_define_tcpip_appl_pdt (
{       save_definition, sd: 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,
    [89, 6, 1, 9, 40, 33, 748],
    clc$command, 3, 2, 0, 0, 0, 0, 2, ''], [
    ['SAVE_DEFINITION                ',clc$nominal_entry, 1],
    ['SD                             ',clc$abbreviation_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [1, 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
    [3, 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$save_definition = 1,
      p$status = 2;

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


    VAR
      ignore_status: ost$status;

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

    IF pvt [p$save_definition].value^.boolean_value.value THEN
      nap$define_tcpip (application_name, max_sockets, capability, ring, system_privilege, protocol, status);
    IFEND;

    definition_changed := FALSE;

    IF status.normal THEN
      clp$end_include (define_tcpip_utility_name, ignore_status);
    IFEND;

  PROCEND end_define_tcpip_application;
?? OLDTITLE ??
?? NEWTITLE := 'sub_display_client_attributes', EJECT ??

  PROCEDURE sub_display_client_attributes
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE dis_client_attrib_pdt (
{  client, c: list of any of key
{      all
{    keyend
{    name
{    anyend
{  display_options, display_option, do, attributes, attribute, a: list of key
{      (protocol, p)
{      (application_identifier, ai)
{      (maximum_connections, mc)
{      (connection_priority, cp)
{      (client_capability, cc)
{      (client_ring, cr)
{      (client_status, cs)
{      (client_system_privilege, csp)
{       all
{    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 .. 11] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] 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 .. 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,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 17] of clt$keyword_specification,
        recend,
        default_value: string (3),
      recend,
      type3: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 10, 14, 15, 52, 399],
    clc$command, 11, 4, 0, 0, 0, 0, 4, ''], [
    ['A                              ',clc$abbreviation_entry, 2],
    ['ATTRIBUTE                      ',clc$alias_entry, 2],
    ['ATTRIBUTES                     ',clc$alias_entry, 2],
    ['C                              ',clc$abbreviation_entry, 1],
    ['CLIENT                         ',clc$nominal_entry, 1],
    ['DISPLAY_OPTION                 ',clc$alias_entry, 2],
    ['DISPLAY_OPTIONS                ',clc$nominal_entry, 2],
    ['DO                             ',clc$alias_entry, 2],
    ['O                              ',clc$abbreviation_entry, 3],
    ['OUTPUT                         ',clc$nominal_entry, 3],
    ['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, 85, clc$optional_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, 652,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 3
    [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, 3,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 4
    [11, 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], [69, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
        ],
      5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$list_type], [636, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$keyword_type], [17], [
      ['AI                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 9],
      ['APPLICATION_IDENTIFIER         ', clc$nominal_entry, clc$normal_usage_entry, 2],
      ['CC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 5],
      ['CLIENT_CAPABILITY              ', clc$nominal_entry, clc$normal_usage_entry, 5],
      ['CLIENT_RING                    ', clc$nominal_entry, clc$normal_usage_entry, 6],
      ['CLIENT_STATUS                  ', clc$nominal_entry, clc$normal_usage_entry, 7],
      ['CLIENT_SYSTEM_PRIVILEGE        ', clc$nominal_entry, clc$normal_usage_entry, 8],
      ['CONNECTION_PRIORITY            ', clc$nominal_entry, clc$normal_usage_entry, 4],
      ['CP                             ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
      ['CR                             ', clc$abbreviation_entry, clc$normal_usage_entry, 6],
      ['CS                             ', clc$abbreviation_entry, clc$normal_usage_entry, 7],
      ['CSP                            ', clc$abbreviation_entry, clc$normal_usage_entry, 8],
      ['MAXIMUM_CONNECTIONS            ', clc$nominal_entry, clc$normal_usage_entry, 3],
      ['MC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
      ['P                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
      ['PROTOCOL                       ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ]
    ,
    'all'],
{ PARAMETER 3
    [[1, 0, clc$file_type],
    '$output'],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$client = 1,
      p$display_options = 2,
      p$output = 3,
      p$status = 4;

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


    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      attributes: client_attribute_set,
      client_count: integer,
      client_ptr: ^clt$data_value,
      client_specified: boolean,
      ignore_status: ost$status,
      output_specified: boolean;


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

    process_client_attrib_parameter (pvt [p$display_options], attributes, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    process_output_parameter (pvt [p$output], output_specified, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF pvt [p$client].specified THEN

    /generate_display/
      BEGIN
        client_ptr := pvt [p$client].value;
        WHILE client_ptr <> NIL DO
          CASE client_ptr^.element_value^.kind OF
          = clc$keyword =
            generate_client_attrib_display (application_name, attributes, application_status, max_connections,
                  connection_priority, capability, ring, system_privilege, reserved_application_id,
                  application_id, protocol, status);
            IF NOT status.normal THEN
              EXIT /generate_display/;
            IFEND;
            nap$get_application_names ($type_of_applications [nac$client_application], application,
                  application_count, status);
            IF NOT status.normal THEN
              EXIT /generate_display/;
            IFEND;
            IF application_count > 0 THEN
              PUSH applications: [1 .. application_count];
              nap$get_application_names ($type_of_applications [nac$client_application], applications^,
                    application_count, status);
              IF NOT status.normal THEN
                EXIT /generate_display/;
              IFEND;
              FOR application_index := 1 TO application_count DO
                display_installed_client (applications^ [application_index].name, attributes, status);
                IF NOT status.normal THEN
                  EXIT /generate_display/;
                IFEND;
              FOREND;
            IFEND;
            EXIT /generate_display/;
          = clc$name =
            IF client_ptr^.element_value^.name_value = application_name THEN
              generate_client_attrib_display (client_ptr^.element_value^.name_value, attributes,
                    application_status, max_connections, connection_priority, capability, ring,
                    system_privilege, reserved_application_id, application_id, protocol, status);
            ELSE
              display_installed_client (client_ptr^.element_value^.name_value, attributes, status);
            IFEND;
            IF NOT status.normal THEN
              EXIT /generate_display/;
            IFEND;
          CASEND;
          client_ptr := client_ptr^.link;
        WHILEND;
      END /generate_display/;
    ELSE
      generate_client_attrib_display (application_name, attributes, application_status, max_connections,
            connection_priority, capability, ring, system_privilege, reserved_application_id, application_id,
            protocol, status);
    IFEND;

    IF output_specified THEN
      clp$close_display (local_display_control, ignore_status);
    IFEND;

  PROCEND sub_display_client_attributes;
?? OLDTITLE ??
?? NEWTITLE := 'sub_display_server_attributes', EJECT ??

  PROCEDURE sub_display_server_attributes
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE dis_server_attrib_pdt (
{  server, s: list of any of key
{      all
{    keyend
{    name
{    anyend
{  display_options, display_option, do, attributes, attribute, a: list of key
{      (accept_connection, ac)
{      (application_identifier, ai)
{      (client_addresses, client_address, ca)
{      (client_info_source, cis)
{      (client_validation, cv)
{      (connection_priority, cp)
{      (maximum_connections, mc)
{      (nam_initiated, ni)
{      (protocol, p)
{      (server_capability, sc)
{      (server_job, sj)
{      (server_job_maximum_connections, sjmc)
{      (server_job_validation_source, sjvs)
{      (server_managed_titles, server_managed_title, smt)
{      (server_ring, sr)
{      (server_status, ss)
{      (server_system_privilege, ssp)
{      (titles, title, t)
{      (title_attributes, title_attribute, ta)
{      all
{    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 .. 11] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] 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 .. 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,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 43] of clt$keyword_specification,
        recend,
        default_value: string (3),
      recend,
      type3: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 10, 14, 15, 58, 860],
    clc$command, 11, 4, 0, 0, 0, 0, 4, ''], [
    ['A                              ',clc$abbreviation_entry, 2],
    ['ATTRIBUTE                      ',clc$alias_entry, 2],
    ['ATTRIBUTES                     ',clc$alias_entry, 2],
    ['DISPLAY_OPTION                 ',clc$alias_entry, 2],
    ['DISPLAY_OPTIONS                ',clc$nominal_entry, 2],
    ['DO                             ',clc$alias_entry, 2],
    ['O                              ',clc$abbreviation_entry, 3],
    ['OUTPUT                         ',clc$nominal_entry, 3],
    ['S                              ',clc$abbreviation_entry, 1],
    ['SERVER                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 4]],
    [
{ PARAMETER 1
    [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, 85, clc$optional_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, 1614,
  clc$optional_default_parameter, 0, 3],
{ 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, 3,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 4
    [11, 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], [69, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
        ],
      5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$list_type], [1598, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$keyword_type], [43], [
      ['AC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
      ['ACCEPT_CONNECTION              ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['AI                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 20],
      ['APPLICATION_IDENTIFIER         ', clc$nominal_entry, clc$normal_usage_entry, 2],
      ['CA                             ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
      ['CIS                            ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
      ['CLIENT_ADDRESS                 ', clc$alias_entry, clc$normal_usage_entry, 3],
      ['CLIENT_ADDRESSES               ', clc$nominal_entry, clc$normal_usage_entry, 3],
      ['CLIENT_INFO_SOURCE             ', clc$nominal_entry, clc$normal_usage_entry, 4],
      ['CLIENT_VALIDATION              ', clc$nominal_entry, clc$normal_usage_entry, 5],
      ['CONNECTION_PRIORITY            ', clc$nominal_entry, clc$normal_usage_entry, 6],
      ['CP                             ', clc$abbreviation_entry, clc$normal_usage_entry, 6],
      ['CV                             ', clc$abbreviation_entry, clc$normal_usage_entry, 5],
      ['MAXIMUM_CONNECTIONS            ', clc$nominal_entry, clc$normal_usage_entry, 7],
      ['MC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 7],
      ['NAM_INITIATED                  ', clc$nominal_entry, clc$normal_usage_entry, 8],
      ['NI                             ', clc$abbreviation_entry, clc$normal_usage_entry, 8],
      ['P                              ', clc$abbreviation_entry, clc$normal_usage_entry, 9],
      ['PROTOCOL                       ', clc$nominal_entry, clc$normal_usage_entry, 9],
      ['SC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 10],
      ['SERVER_CAPABILITY              ', clc$nominal_entry, clc$normal_usage_entry, 10],
      ['SERVER_JOB                     ', clc$nominal_entry, clc$normal_usage_entry, 11],
      ['SERVER_JOB_MAXIMUM_CONNECTIONS ', clc$nominal_entry, clc$normal_usage_entry, 12],
      ['SERVER_JOB_VALIDATION_SOURCE   ', clc$nominal_entry, clc$normal_usage_entry, 13],
      ['SERVER_MANAGED_TITLE           ', clc$alias_entry, clc$normal_usage_entry, 14],
      ['SERVER_MANAGED_TITLES          ', clc$nominal_entry, clc$normal_usage_entry, 14],
      ['SERVER_RING                    ', clc$nominal_entry, clc$normal_usage_entry, 15],
      ['SERVER_STATUS                  ', clc$nominal_entry, clc$normal_usage_entry, 16],
      ['SERVER_SYSTEM_PRIVILEGE        ', clc$nominal_entry, clc$normal_usage_entry, 17],
      ['SJ                             ', clc$abbreviation_entry, clc$normal_usage_entry, 11],
      ['SJMC                           ', clc$abbreviation_entry, clc$normal_usage_entry, 12],
      ['SJVS                           ', clc$abbreviation_entry, clc$normal_usage_entry, 13],
      ['SMT                            ', clc$abbreviation_entry, clc$normal_usage_entry, 14],
      ['SR                             ', clc$abbreviation_entry, clc$normal_usage_entry, 15],
      ['SS                             ', clc$abbreviation_entry, clc$normal_usage_entry, 16],
      ['SSP                            ', clc$abbreviation_entry, clc$normal_usage_entry, 17],
      ['T                              ', clc$abbreviation_entry, clc$normal_usage_entry, 18],
      ['TA                             ', clc$abbreviation_entry, clc$normal_usage_entry, 19],
      ['TITLE                          ', clc$alias_entry, clc$normal_usage_entry, 18],
      ['TITLES                         ', clc$nominal_entry, clc$normal_usage_entry, 18],
      ['TITLE_ATTRIBUTE                ', clc$alias_entry, clc$normal_usage_entry, 19],
      ['TITLE_ATTRIBUTES               ', clc$nominal_entry, clc$normal_usage_entry, 19]]
      ]
    ,
    'all'],
{ PARAMETER 3
    [[1, 0, clc$file_type],
    '$output'],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$server = 1,
      p$display_options = 2,
      p$output = 3,
      p$status = 4;

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


    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      attributes: server_attribute_set,
      ignore_status: ost$status,
      output_specified: boolean,
      server_count: integer,
      server_ptr: ^clt$data_value,
      server_specified: boolean;


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

    process_server_attrib_parameter (pvt [p$display_options], attributes, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    process_output_parameter (pvt [p$output], output_specified, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF utility_state = defining_server THEN
      server_job_specified := TRUE;
    IFEND;

    IF pvt [p$server].specified THEN

    /generate_display/
      BEGIN
        server_ptr := pvt [p$server].value;
        WHILE server_ptr <> NIL DO
          CASE server_ptr^.element_value^.kind OF
          = clc$keyword =
            generate_server_attrib_display (application_name, attributes, application_status, selected_titles,
                  server_managed_titles, max_connections, connection_priority, capability, ring,
                  system_privilege, accept_connection, client_capability, client_info_source,
                  client_addresses, reserved_application_id, application_id, protocol, nam_initiated,
                  server_job_specified, server_job, server_job_validation_source, server_job_max_connections,
                  status);
            nap$get_application_names ($type_of_applications [nac$server_application], application,
                  application_count, status);
            IF NOT status.normal THEN
              EXIT /generate_display/;
            IFEND;
            IF application_count > 0 THEN
              PUSH applications: [1 .. application_count];
              nap$get_application_names ($type_of_applications [nac$server_application], applications^,
                    application_count, status);
              IF NOT status.normal THEN
                EXIT /generate_display/;
              IFEND;
              FOR application_index := 1 TO application_count DO
                display_installed_server (applications^ [application_index].name, attributes, status);
                IF NOT status.normal THEN
                  EXIT /generate_display/;
                IFEND;
              FOREND;
            IFEND;
            EXIT /generate_display/;
          = clc$name =
            IF server_ptr^.element_value^.name_value = application_name THEN
              generate_server_attrib_display (server_ptr^.element_value^.name_value, attributes,
                    application_status, selected_titles, server_managed_titles, max_connections,
                    connection_priority, capability, ring, system_privilege, accept_connection,
                    client_capability, client_info_source, client_addresses, reserved_application_id,
                    application_id, protocol, nam_initiated, server_job_specified, server_job,
                    server_job_validation_source, server_job_max_connections, status);
            ELSE
              display_installed_server (server_ptr^.element_value^.name_value, attributes, status);
            IFEND;
            IF NOT status.normal THEN
              EXIT /generate_display/;
            IFEND;
          CASEND;
          server_ptr := server_ptr^.link;
        WHILEND;
      END /generate_display/;
    ELSE
      generate_server_attrib_display (application_name, attributes, application_status, selected_titles,
            server_managed_titles, max_connections, connection_priority, capability, ring, system_privilege,
            accept_connection, client_capability, client_info_source, client_addresses,
            reserved_application_id, application_id, protocol, nam_initiated, server_job_specified,
            server_job, server_job_validation_source, server_job_max_connections, status);
    IFEND;

    IF output_specified THEN
      clp$close_display (local_display_control, ignore_status);
    IFEND;

  PROCEND sub_display_server_attributes;
?? OLDTITLE ??
?? NEWTITLE := 'sub_display_tcpip_attributes', EJECT ??

  PROCEDURE sub_display_tcpip_attributes
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE sub_display_tcpip_attribute (
{       application, a: list of any of key
{             all
{         keyend
{         name
{         anyend
{       display_option, display_options, do: list of key
{             (protocol, p)
{             (maximum_sockets, ms)
{             (capability, c)
{             (ring, r)
{             (system_privilege, sp)
{             all
{         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 .. 8] of clt$pdt_parameter_name,
      parameters: array [1 .. 4] 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 .. 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,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 11] of clt$keyword_specification,
        recend,
        default_value: string (3),
      recend,
      type3: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 23, 8, 50, 30, 744],
    clc$command, 8, 4, 0, 0, 0, 0, 4, ''], [
    ['A                              ',clc$abbreviation_entry, 1],
    ['APPLICATION                    ',clc$nominal_entry, 1],
    ['DISPLAY_OPTION                 ',clc$nominal_entry, 2],
    ['DISPLAY_OPTIONS                ',clc$alias_entry, 2],
    ['DO                             ',clc$abbreviation_entry, 2],
    ['O                              ',clc$abbreviation_entry, 3],
    ['OUTPUT                         ',clc$nominal_entry, 3],
    ['STATUS                         ',clc$nominal_entry, 4]],
    [
{ 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$optional_parameter,
  0, 0],
{ 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, 430,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 3
    [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, 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$list_type], [69, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
        ],
      5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$list_type], [414, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$keyword_type], [11], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 6],
      ['C                              ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
      ['CAPABILITY                     ', clc$nominal_entry, clc$normal_usage_entry, 3],
      ['MAXIMUM_SOCKETS                ', clc$nominal_entry, clc$normal_usage_entry, 2],
      ['MS                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
      ['P                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
      ['PROTOCOL                       ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['R                              ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
      ['RING                           ', clc$nominal_entry, clc$normal_usage_entry, 4],
      ['SYSTEM_PRIVILEGE               ', clc$nominal_entry, clc$normal_usage_entry, 5],
      ['SP                             ', clc$abbreviation_entry, clc$normal_usage_entry, 5]]
      ]
    ,
    'all'],
{ PARAMETER 3
    [[1, 0, clc$file_type],
    '$output'],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$application = 1,
      p$display_option = 2,
      p$output = 3,
      p$status = 4;

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

    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      attributes: tcpip_attribute_set,
      ignore_status: ost$status,
      output_specified: boolean,
      tcpip_index_ptr: ^clt$data_value;


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

    process_tcpip_attrib_parameter (pvt [p$display_option], attributes, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    process_output_parameter (pvt [p$output], output_specified, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF pvt [p$application].specified THEN

    /generate_display/
      BEGIN
        tcpip_index_ptr := pvt [p$application].value;
        WHILE tcpip_index_ptr <> NIL DO
          CASE tcpip_index_ptr^.element_value^.kind OF
          = clc$keyword =
            nap$get_application_names ($type_of_applications [nac$tcpip_application], application,
                  application_count, status);
            IF NOT status.normal THEN
              EXIT /generate_display/;
            IFEND;
            IF application_count > 0 THEN
              PUSH applications: [1 .. application_count];
              nap$get_application_names ($type_of_applications [nac$tcpip_application], applications^,
                    application_count, status);
              IF NOT status.normal THEN
                EXIT /generate_display/;
              IFEND;
              FOR application_index := 1 TO application_count DO
                display_installed_tcpip (applications^ [application_index].name, attributes, status);
                IF NOT status.normal THEN
                  EXIT /generate_display/;
                IFEND;
              FOREND;
            ELSE
              osp$set_status_abnormal (nac$status_id, nae$application_not_defined, 'tcpip', status);
            IFEND;
            EXIT /generate_display/;
          = clc$name =
            IF tcpip_index_ptr^.element_value^.name_value = application_name THEN
              generate_tcpip_attrib_display (tcpip_index_ptr^.element_value^.name_value, attributes,
                    max_sockets, capability, ring, system_privilege, protocol, status);
            ELSE
              display_installed_tcpip (tcpip_index_ptr^.element_value^.name_value, attributes, status);
            IFEND;
            IF NOT status.normal THEN
              EXIT /generate_display/;
            IFEND;
          CASEND;
          tcpip_index_ptr := tcpip_index_ptr^.link;
        WHILEND;
      END /generate_display/;
    ELSE
      generate_tcpip_attrib_display (application_name, attributes, max_sockets, capability, ring,
            system_privilege, protocol, status);
    IFEND;

    IF output_specified THEN
      clp$close_display (local_display_control, ignore_status);
    IFEND;

  PROCEND sub_display_tcpip_attributes;
?? OLDTITLE ??
?? NEWTITLE := 'sub_generate_client_definition', EJECT ??

  PROCEDURE sub_generate_client_definition
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE gen_client_def_pdt (
{        client, c: list of any of key
{            all
{          keyend
{          name
{          anyend
{        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 .. 5] 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 .. 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,
      recend,
      type2: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 10, 14, 16, 4, 559],
    clc$command, 5, 3, 0, 0, 0, 0, 3, ''], [
    ['C                              ',clc$abbreviation_entry, 1],
    ['CLIENT                         ',clc$nominal_entry, 1],
    ['O                              ',clc$abbreviation_entry, 2],
    ['OUTPUT                         ',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$optional_parameter,
  0, 0],
{ PARAMETER 2
    [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, 3,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 3
    [5, 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], [69, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
        ],
      5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$file_type],
    '$output'],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

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

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

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


    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      client_count: integer,
      client_ptr: ^clt$data_value,
      client_specified: boolean,
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      ignore_status: ost$status,
      local_status: ost$status;

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

      VAR
        ignore_status: ost$status;

      fsp$close_file (output_file_id, ignore_status);

    PROCEND exit_condition_handler;

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

    pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);

    process_output_file (pvt [p$output].value^.file_value^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF pvt [p$client].specified THEN

    /generate_definition/
      BEGIN
        client_ptr := pvt [p$client].value;
        WHILE client_ptr <> NIL DO
          CASE client_ptr^.element_value^.kind OF
          = clc$keyword =
            generate_client_definition_cmds (application_name, application_status, max_connections,
                  connection_priority, capability, ring, system_privilege, reserved_application_id,
                  application_id, protocol, status);
            nap$get_application_names ($type_of_applications [nac$client_application], application,
                  application_count, status);
            IF NOT status.normal THEN
              EXIT /generate_definition/;
            IFEND;
            IF application_count > 0 THEN
              PUSH applications: [1 .. application_count];
              nap$get_application_names ($type_of_applications [nac$client_application], applications^,
                    application_count, status);
              IF NOT status.normal THEN
                EXIT /generate_definition/;
              IFEND;
              FOR application_index := 1 TO application_count DO
                generate_installed_client_def (applications^ [application_index].name, status);
                IF NOT status.normal THEN
                  EXIT /generate_definition/;
                IFEND;
              FOREND;
            IFEND;
            EXIT /generate_definition/;
          = clc$name =
            IF client_ptr^.element_value^.name_value = application_name THEN
              generate_client_definition_cmds (client_ptr^.element_value^.name_value, application_status,
                    max_connections, connection_priority, capability, ring, system_privilege,
                    reserved_application_id, application_id, protocol, status);
            ELSE
              generate_installed_client_def (client_ptr^.element_value^.name_value, status);
            IFEND;
            IF NOT status.normal THEN
              EXIT /generate_definition/;
            IFEND;
          CASEND;
          client_ptr := client_ptr^.link;

        WHILEND;
      END /generate_definition/;
    ELSE
      generate_client_definition_cmds (application_name, application_status, max_connections,
            connection_priority, capability, ring, system_privilege, reserved_application_id, application_id,
            protocol, status);
    IFEND;
    fsp$close_file (output_file_id, local_status);
    IF (NOT local_status.normal) AND status.normal THEN
      status := local_status;
    IFEND;
    pmp$disestablish_cond_handler (exit_condition, ignore_status);

  PROCEND sub_generate_client_definition;
?? OLDTITLE ??
?? NEWTITLE := 'sub_generate_server_definition', EJECT ??

  PROCEDURE sub_generate_server_definition
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{  PROCEDURE gen_server_def_pdt (
{        server, s: list of any of key
{            all
{          keyend
{          name
{          anyend
{        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 .. 5] 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 .. 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,
      recend,
      type2: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 7, 10, 14, 16, 8, 930],
    clc$command, 5, 3, 0, 0, 0, 0, 3, ''], [
    ['O                              ',clc$abbreviation_entry, 2],
    ['OUTPUT                         ',clc$nominal_entry, 2],
    ['S                              ',clc$abbreviation_entry, 1],
    ['SERVER                         ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 3]],
    [
{ PARAMETER 1
    [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, 85, 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, 3,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 3
    [5, 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], [69, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
        ],
      5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$file_type],
    '$output'],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

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

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

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


    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      ignore_status: ost$status,
      local_status: ost$status,
      server_count: integer,
      server_ptr: ^clt$data_value,
      server_specified: boolean;

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

      VAR
        ignore_status: ost$status;

      fsp$close_file (output_file_id, ignore_status);

    PROCEND exit_condition_handler;

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

    pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);

    process_output_file (pvt [p$output].value^.file_value^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF utility_state = defining_server THEN
      server_job_specified := TRUE;
    IFEND;

    IF pvt [p$server].specified THEN

    /generate_definition/
      BEGIN
        server_ptr := pvt [p$server].value;
        WHILE server_ptr <> NIL DO
          CASE server_ptr^.element_value^.kind OF
          = clc$keyword =
            generate_server_definition_cmds (application_name, application_status, selected_titles,
                  server_managed_titles, max_connections, connection_priority, capability, ring,
                  system_privilege, accept_connection, client_capability, client_info_source,
                  client_addresses, reserved_application_id, application_id, protocol, nam_initiated,
                  server_job_specified, server_job, server_job_validation_source, server_job_max_connections,
                  status);
            nap$get_application_names ($type_of_applications [nac$server_application], application,
                  application_count, status);
            IF NOT status.normal THEN
              EXIT /generate_definition/;
            IFEND;
            IF application_count > 0 THEN
              PUSH applications: [1 .. application_count];
              nap$get_application_names ($type_of_applications [nac$server_application], applications^,
                    application_count, status);
              IF NOT status.normal THEN
                EXIT /generate_definition/;
              IFEND;
              FOR application_index := 1 TO application_count DO
                generate_installed_server_def (applications^ [application_index].name, status);
                IF NOT status.normal THEN
                  EXIT /generate_definition/;
                IFEND;
              FOREND;
            IFEND;
            EXIT /generate_definition/;
          = clc$name =
            IF server_ptr^.element_value^.name_value = application_name THEN
              generate_server_definition_cmds (server_ptr^.element_value^.name_value, application_status,
                    selected_titles, server_managed_titles, max_connections, connection_priority, capability,
                    ring, system_privilege, accept_connection, client_capability, client_info_source,
                    client_addresses, reserved_application_id, application_id, protocol, nam_initiated,
                    server_job_specified, server_job, server_job_validation_source,
                    server_job_max_connections, status);
            ELSE
              generate_installed_server_def (server_ptr^.element_value^.name_value, status);
            IFEND;
            IF NOT status.normal THEN
              EXIT /generate_definition/;
            IFEND;
          CASEND;

          server_ptr := server_ptr^.link;

        WHILEND;
      END /generate_definition/;
    ELSE
      generate_server_definition_cmds (application_name, application_status, selected_titles,
            server_managed_titles, max_connections, connection_priority, capability, ring, system_privilege,
            accept_connection, client_capability, client_info_source, client_addresses,
            reserved_application_id, application_id, protocol, nam_initiated, server_job_specified,
            server_job, server_job_validation_source, server_job_max_connections, status);
    IFEND;

    fsp$close_file (output_file_id, local_status);
    IF (NOT local_status.normal) AND status.normal THEN
      status := local_status;
    IFEND;
    pmp$disestablish_cond_handler (exit_condition, ignore_status);

  PROCEND sub_generate_server_definition;
?? OLDTITLE ??
?? NEWTITLE := 'sub_generate_tcpip_definition', EJECT ??

  PROCEDURE sub_generate_tcpip_definition
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE sub_generate_tcpip_definition (
{       application, a: list of any of key
{           all
{         keyend
{         name
{         anyend
{       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 .. 5] 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 .. 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,
      recend,
      type2: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 23, 8, 50, 41, 809],
    clc$command, 5, 3, 0, 0, 0, 0, 3, ''], [
    ['A                              ',clc$abbreviation_entry, 1],
    ['APPLICATION                    ',clc$nominal_entry, 1],
    ['O                              ',clc$abbreviation_entry, 2],
    ['OUTPUT                         ',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$optional_parameter,
  0, 0],
{ PARAMETER 2
    [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, 3,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 3
    [5, 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], [69, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
      FALSE, 2],
      44, [[1, 0, clc$keyword_type], [1], [
        ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
        ],
      5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$file_type],
    '$output'],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

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

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

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

    VAR
      application_count: nat$max_applications,
      application_index: nat$max_applications,
      application: array [1 .. 1] of nat$application_attribute,
      applications: ^array [1 .. * ] of nat$application_attribute,
      exit_condition: [STATIC] pmt$condition := [pmc$block_exit_processing,
            [pmc$block_exit, pmc$program_termination, pmc$program_abort]],
      exit_descriptor: pmt$established_handler,
      ignore_status: ost$status,
      local_status: ost$status,
      tcpip_index_ptr: ^clt$data_value;

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

      VAR
        ignore_status: ost$status;

      fsp$close_file (output_file_id, ignore_status);

    PROCEND exit_condition_handler;

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

    pmp$establish_condition_handler (exit_condition, ^exit_condition_handler, ^exit_descriptor, status);

    process_output_file (pvt [p$output].value^.file_value^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF pvt [p$application].specified THEN

    /generate_definition/
      BEGIN
        tcpip_index_ptr := pvt [p$application].value;
        WHILE tcpip_index_ptr <> NIL DO
          CASE tcpip_index_ptr^.element_value^.kind OF
          = clc$keyword =
            generate_installed_tcpip_cmds (application_name, max_sockets, capability, ring, system_privilege,
                  protocol, status);
            IF NOT status.normal THEN
              EXIT /generate_definition/;
            IFEND;
            nap$get_application_names ($type_of_applications [nac$tcpip_application], application,
                  application_count, status);
            IF NOT status.normal THEN
              EXIT /generate_definition/;
            IFEND;
            IF application_count > 0 THEN
              PUSH applications: [1 .. application_count];
              nap$get_application_names ($type_of_applications [nac$tcpip_application], applications^,
                    application_count, status);
              IF NOT status.normal THEN
                EXIT /generate_definition/;
              IFEND;
              FOR application_index := 1 TO application_count DO
                generate_installed_tcpip_def (applications^ [application_index].name, status);
                IF NOT status.normal THEN
                  EXIT /generate_definition/;
                IFEND;
              FOREND;
            ELSE
              osp$set_status_abnormal (nac$status_id, nae$application_not_defined, 'tcpip', status);
            IFEND;
            EXIT /generate_definition/;
          = clc$name =
            IF tcpip_index_ptr^.element_value^.name_value = application_name THEN
              generate_installed_tcpip_cmds (application_name, max_sockets, capability, ring,
                    system_privilege, protocol, status);
            ELSE
              generate_installed_tcpip_def (tcpip_index_ptr^.element_value^.name_value, status);
            IFEND;
            IF NOT status.normal THEN
              EXIT /generate_definition/;
            IFEND;
          CASEND;
          tcpip_index_ptr := tcpip_index_ptr^.link;
        WHILEND;
      END /generate_definition/;
    ELSE
      generate_installed_tcpip_cmds (application_name, max_sockets, capability, ring, system_privilege,
            protocol, status);
    IFEND;

    fsp$close_file (output_file_id, local_status);
    IF (NOT local_status.normal) AND status.normal THEN
      status := local_status;
    IFEND;
    pmp$disestablish_cond_handler (exit_condition, ignore_status);

  PROCEND sub_generate_tcpip_definition;

?? OLDTITLE ??
?? OLDTITLE ??
?? NEWTITLE := 'Utility Routines' ??
?? NEWTITLE := 'add_string_to_line', EJECT ??

  PROCEDURE add_string_to_line
    (    last_parameter: boolean;
         s: string ( * );
     VAR status: ost$status);

    VAR
      reserve_size: 0 .. continuation_indicator_size,
      string_index: ost$string_index,
      string_size: ost$string_size,
      temp_size: clt$command_line_size;

    status.normal := TRUE;
    IF last_parameter THEN
      reserve_size := 0;
    ELSE
      reserve_size := continuation_indicator_size;
    IFEND;

    string_size := STRLENGTH (s);
    string_index := 1;
    WHILE string_size > 0 DO
      IF fits_on_current_line (string_size, reserve_size) THEN
        add_to_line (s (string_index, string_size));
        RETURN;
      IFEND;
      temp_size := page_width - line.size;
      IF temp_size > continuation_indicator_size THEN
        temp_size := temp_size - continuation_indicator_size;
        add_to_line (s (string_index, temp_size));
        string_size := string_size - temp_size;
        string_index := string_index + temp_size;
      IFEND;
      IF string_size > 0 THEN
        add_to_line ('..');
        put_line (status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        indent_line (initial_indent_column);
      IFEND;
    WHILEND;
  PROCEND add_string_to_line;
?? OLDTITLE ??
?? NEWTITLE := 'add_to_line_if_can', EJECT ??

  PROCEDURE add_to_line_if_can
    (    last_parameter: boolean;
         s: string ( * );
     VAR status: ost$status);

    VAR
      continuation_indent_column: clt$command_line_index,
      reserve_size: 0 .. continuation_indicator_size,
      string_size: cyt$string_size;

    status.normal := TRUE;
    continuation_indent_column := current_indent_column + continuation_increment;
    IF last_parameter THEN
      reserve_size := 0;
    ELSE
      reserve_size := continuation_indicator_size;
    IFEND;

    string_size := STRLENGTH (s);
    IF fits_on_current_line (string_size, reserve_size) THEN
      add_to_line (s (1, string_size));
    ELSE
      IF line.size > initial_indent_column THEN
        add_to_line ('..');
        put_line (status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        indent_line (continuation_indent_column);
      IFEND;
      add_to_line (s (1, string_size));
    IFEND;
  PROCEND add_to_line_if_can;

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

  PROCEDURE display_installed_client
    (    client: nat$application_name;
         attributes: client_attribute_set;
     VAR status: ost$status);

    VAR
      application_id: nat$internet_sap_identifier,
      application_status: nat$application_status,
      capability: ost$name,
      connection_priority: nat$network_message_priority,
      max_connections: nat$number_of_connections,
      protocol: nat$protocol,
      reserved_application_id: boolean,
      ring: ost$ring,
      system_privilege: boolean;

    nap$get_client_attributes (client, application_status, max_connections, connection_priority, protocol,
          reserved_application_id, application_id, capability, ring, system_privilege, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    generate_client_attrib_display (client, attributes, application_status, max_connections,
          connection_priority, capability, ring, system_privilege, reserved_application_id, application_id,
          protocol, status);

  PROCEND display_installed_client;
?? OLDTITLE ??
?? NEWTITLE := 'display_installed_server', EJECT ??

  PROCEDURE display_installed_server
    (    server: nat$application_name;
         attributes: server_attribute_set;
     VAR status: ost$status);

    VAR
      accept_connection: boolean,
      application_id: nat$internet_sap_identifier,
      application_status: nat$application_status,
      capability: ost$name,
      client_capability: ost$name,
      client_info_source: nat$client_info_source,
      client_address: array [1 .. 1] of nat$client_address,
      client_addresses: ^array [1 .. * ] of nat$client_address,
      client_address_count: integer,
      connection_priority: nat$network_message_priority,
      file: clt$file,
      max_connections: nat$number_of_connections,
      nam_initiated: boolean,
      protocol: nat$protocol,
      reserved_application_id: boolean,
      ring: ost$ring,
      selected_title: array [1 .. 1] of nat$selected_title,
      selected_titles: ^array [1 .. * ] of nat$selected_title,
      selected_title_count: nat$max_titles,
      server_managed_title: array [1 .. 1] of string (nac$max_title_pattern_length),
      server_managed_titles: ^nat$title_pattern_list,
      server_managed_title_count: nat$max_titles,
      server_job: amt$local_file_name,
      server_job_validation_source: nat$server_validation_source,
      server_job_max_connections: nat$number_of_connections,
      server_job_specified: boolean,
      system_privilege: boolean;

    server_job := '';
    nap$get_server_attributes (server, application_status, selected_title_count, ^selected_title,
          server_managed_title_count, ^server_managed_title, max_connections, connection_priority, capability,
          ring, system_privilege, accept_connection, client_capability, client_info_source,
          client_address_count, ^client_address, reserved_application_id, application_id, protocol,
          nam_initiated, server_job_validation_source, server_job_max_connections, server_job_specified,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    IF selected_title_count = 0 THEN
      selected_titles := NIL;
    ELSE
      selected_titles := ^selected_title;
    IFEND;
    IF server_managed_title_count = 0 THEN
      server_managed_titles := NIL;
    ELSE
      server_managed_titles := ^server_managed_title;
    IFEND;
    IF client_address_count = 0 THEN
      client_addresses := NIL;
    ELSE
      client_addresses := ^client_address;
    IFEND;
    IF (selected_title_count > 1) OR (client_address_count > 1) OR (server_managed_title_count > 1) THEN
      IF selected_title_count > 1 THEN
        PUSH selected_titles: [1 .. selected_title_count];
      IFEND;
      IF server_managed_title_count > 1 THEN
        PUSH server_managed_titles: [1 .. server_managed_title_count];
      IFEND;
      IF client_address_count > 1 THEN
        PUSH client_addresses: [1 .. client_address_count];
      IFEND;
      nap$get_server_attributes (server, application_status, selected_title_count, selected_titles,
            server_managed_title_count, server_managed_titles, max_connections, connection_priority,
            capability, ring, system_privilege, accept_connection, client_capability, client_info_source,
            client_address_count, client_addresses, reserved_application_id, application_id, protocol,
            nam_initiated, server_job_validation_source, server_job_max_connections, server_job_specified,
            status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF NOT server_job_specified THEN
      server_job := clc$null_file;
    IFEND;
    generate_server_attrib_display (server, attributes, application_status, selected_titles,
          server_managed_titles, max_connections, connection_priority, capability, ring, system_privilege,
          accept_connection, client_capability, client_info_source, client_addresses, reserved_application_id,
          application_id, protocol, nam_initiated, {server_lfn_specified} NOT server_job_specified,
          server_job, server_job_validation_source, server_job_max_connections, status);

  PROCEND display_installed_server;
?? OLDTITLE ??
?? NEWTITLE := 'display_installed_tcpip', EJECT ??

  PROCEDURE display_installed_tcpip
    (    tcpip: nat$application_name;
         attributes: tcpip_attribute_set;
     VAR status: ost$status);

    VAR
      capability: ost$name,
      max_sockets: nat$number_of_sockets,
      protocol: nat$protocol,
      ring: ost$ring,
      system_privilege: boolean,
      tcpip_status: nat$application_status;

    nap$get_tcpip_attributes (tcpip, tcpip_status, max_sockets, capability, ring, system_privilege, protocol,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    generate_tcpip_attrib_display (tcpip, attributes, max_sockets, capability, ring, system_privilege,
          protocol, status);

  PROCEND display_installed_tcpip;
?? OLDTITLE ??
?? NEWTITLE := 'display_message', EJECT ??

  PROCEDURE display_message
    (    message_status: ost$status;
     VAR status: ost$status);

{ PURPOSE: Format and display a NOS/VE status condition.
{ DESIGN:  The message status is formatted with calls to system routines and written to
{          the $ERRORS file.

    VAR
      attachment_selections: [STATIC, READ] array [1 .. 1] of fst$attachment_option :=
            [[fsc$access_and_share_modes, [fsc$specific_access_modes,
            [fsc$shorten, fsc$append, fsc$modify]], * ]],
      byte_address: amt$file_byte_address,
      error_file_id: [STATIC] amt$file_identifier,
      error_file_name: [STATIC, READ] amt$local_file_name := '$ERRORS',
      error_file_opened: [STATIC] boolean := FALSE,
      ignore_status: ost$status,
      length_pointer: ^ost$status_message_line_size,
      line_count_pointer: ^ost$status_message_line_count,
      line_index: ost$status_message_line_count,
      message: ost$status_message,
      message_sequence: ^ost$status_message,
      text_pointer: ^ost$status_message_line;

    IF NOT error_file_opened THEN
      fsp$open_file (error_file_name, amc$record, ^attachment_selections, {default_creation_attributes =} NIL,
            {mandated_creation_attributes =} NIL, {attribute_validation =} NIL, {attribute_override =} NIL,
            error_file_id, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      error_file_opened := TRUE;
    IFEND;

    osp$format_message (message_status, osc$current_message_level, osc$max_status_message_line, message,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    message_sequence := ^message;
    RESET message_sequence;
    NEXT line_count_pointer IN message_sequence;

    FOR line_index := 1 TO line_count_pointer^ DO
      NEXT length_pointer IN message_sequence;
      NEXT text_pointer: [length_pointer^] IN message_sequence;
      amp$put_next (error_file_id, text_pointer, length_pointer^, byte_address, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    FOREND;

  PROCEND display_message;

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

  PROCEDURE get_server_job_command
    (    file_identifier: amt$file_identifier;
     VAR command_line: ^clt$command_line;
     VAR line_size: clt$command_line_size;
     VAR status: ost$status);

    VAR
      byte_address: amt$file_byte_address,
      continuation_line: ^clt$command_line,
      continuation_line_size: clt$command_line_size,
      file_position: amt$file_position,
      line_continued: boolean,
      transfer_count: amt$transfer_count;

    status.normal := TRUE;
    line_size := 0;

    PUSH continuation_line: [clc$max_command_line_size];

    amp$get_next (file_identifier, command_line, #SIZE (command_line^), transfer_count, byte_address,
          file_position, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    IF file_position = amc$eoi THEN
      command_line := NIL;
      RETURN;
    IFEND;
    line_size := transfer_count;
    IF (transfer_count >= 2) AND (command_line^ (transfer_count - 1, 2) = '..') THEN
      line_size := transfer_count - 2;
      WHILE (line_size > 0) AND (command_line^ (line_size) = '.') DO
        line_size := line_size - 1;
      WHILEND;
      REPEAT
        amp$get_next (file_identifier, continuation_line, #SIZE (continuation_line^), transfer_count,
              byte_address, file_position, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        IF file_position = amc$eoi THEN
          command_line := NIL;
          RETURN;
        IFEND;
        continuation_line_size := transfer_count;
        line_continued := (continuation_line_size >= 2) AND
              (continuation_line^ (continuation_line_size - 1, 2) = '..');
        IF line_continued THEN
          continuation_line_size := continuation_line_size - 2;
          WHILE (continuation_line_size > 0) AND (continuation_line^ (continuation_line_size) = '.') DO
            continuation_line_size := continuation_line_size - 1;
          WHILEND;
        IFEND;
        IF (line_size + continuation_line_size) > clc$max_command_line_size THEN
          osp$set_status_condition (cle$continued_line_too_long, status);
          RETURN;
        IFEND;
        command_line^ (line_size + 1, continuation_line_size) := continuation_line^;
        line_size := line_size + continuation_line_size;
      UNTIL NOT line_continued;
    IFEND;

  PROCEND get_server_job_command;
?? OLDTITLE ??
?? NEWTITLE := 'generate_client_attrib_display', EJECT ??

  PROCEDURE generate_client_attrib_display
    (    client: nat$application_name;
         attributes: client_attribute_set;
         application_status: nat$application_status;
         max_connections: nat$number_of_connections;
         connection_priority: nat$network_message_priority;
         capability: ost$name;
         ring: ost$ring;
         system_privilege: boolean,
         reserved_application_id: boolean;
         application_id: nat$internet_sap_identifier;
         protocol: nat$protocol;
     VAR status: ost$status);

    VAR
      address_index: integer,
      j: integer;

    status.normal := TRUE;

    add_to_line ('Client:');
    tab_line (display_spacer);
    add_to_line (client);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF ca$status IN attributes THEN
      add_to_line ('  Status: ');
      tab_line (display_spacer);
      add_to_line (application_status_description [application_status]);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF ca$protocol IN attributes THEN
      add_to_line ('  Protocol: ');
      tab_line (display_spacer);
      add_to_line (protocol_label [protocol]);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF ca$application_id IN attributes THEN
      add_to_line ('  Application_Identifier: ');
      tab_line (display_spacer);
      IF reserved_application_id THEN
        add_integer_to_line (application_id);
      ELSE
        add_to_line ('Variable');
      IFEND;
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF ca$max_connections IN attributes THEN
      add_to_line ('  Maximum_connections: ');
      tab_line (display_spacer);
      add_integer_to_line (max_connections);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF ca$connection_priority IN attributes THEN
      indent_line (3);
      add_to_line ('Connection_priority: ');
      tab_line (display_spacer);
      add_integer_to_line (connection_priority);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF ca$client_capability IN attributes THEN
      add_to_line ('  Client_capability: ');
      tab_line (display_spacer);
      IF capability = osc$null_name THEN
        add_to_line ('None');
      ELSE
        add_to_line (capability);
      IFEND;
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF ca$client_ring IN attributes THEN
      add_to_line ('  Client_ring: ');
      tab_line (display_spacer);
      add_integer_to_line (ring);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF ca$client_system_priv IN attributes THEN
      add_to_line ('  Client_system_privilege: ');
      tab_line (display_spacer);
      add_boolean_to_line (system_privilege);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

  PROCEND generate_client_attrib_display;
?? OLDTITLE ??
?? NEWTITLE := 'generate_client_definition_cmds', EJECT ??

  PROCEDURE generate_client_definition_cmds
    (    client: nat$application_name;
         application_status: nat$application_status;
         max_connections: nat$number_of_connections;
         connection_priority: nat$network_message_priority;
         capability: ost$name;
         ring: ost$ring;
         system_privilege: boolean;
         reserved_application_id: boolean;
         application_id: nat$internet_sap_identifier;
         protocol: nat$protocol;
     VAR status: ost$status);

    VAR
      b_string: string (5),
      current_indent_column: clt$command_line_index,
      i_string: ost$string,
      ignore_status: ost$status,
      length: integer,
      str: string (osc$max_string_size);

    status.normal := TRUE;
    current_indent_column := initial_indent_column;

{  Generate define_client command.

    put_line (status); { blank line }
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    indent_line (current_indent_column);
    add_to_line ('define_client');
    STRINGREP (str, length, ' client=', client (1, clp$trimmed_string_size (client)));
    add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    STRINGREP (str, length, ' protocol=', protocol_label [protocol]
          (1, clp$trimmed_string_size (protocol_label [protocol])));
    add_to_line_if_can (TRUE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{  Generate define_client subcommands that make up the client definition.

    current_indent_column := initial_indent_column + indent_increment;

{   Application identifier

    indent_line (current_indent_column);
    add_to_line ('change_application_identifier');
    IF reserved_application_id THEN
      clp$convert_integer_to_string (application_id, 10, FALSE, i_string, ignore_status);
      STRINGREP (str, length, ' application_identifier=', i_string.value (1, i_string.size));
      add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    ELSE
      add_to_line_if_can ({last_parameter=} TRUE, ' application_identifier=variable', status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{   Maximum connections

    indent_line (current_indent_column);
    add_to_line ('change_maximum_connections');
    clp$convert_integer_to_string (max_connections, 10, FALSE, i_string, ignore_status);
    STRINGREP (str, length, ' maximum_connections=', i_string.value (1, i_string.size));
    add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{   Connection priority

    indent_line (current_indent_column);
    add_to_line ('change_connection_priority');
    clp$convert_integer_to_string (connection_priority, 10, FALSE, i_string, ignore_status);
    STRINGREP (str, length, ' connection_priority=', i_string.value (1, i_string.size));
    add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{   Client capability / Client ring / Client system privilege

    indent_line (current_indent_column);
    add_to_line ('change_client_validation');

    IF capability = osc$null_name THEN
      add_to_line_if_can ({last_parameter=} FALSE, ' capability=none', status);
    ELSE
      STRINGREP (str, length, ' capability=', capability (1, clp$trimmed_string_size (capability)));
      add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$convert_integer_to_string (ring, 10, FALSE, i_string, ignore_status);
    STRINGREP (str, length, ' ring=', i_string.value (1, i_string.size));
    add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    STRINGREP (str, length, ' system_privilege=', boolean_label [system_privilege] (1,
          clp$trimmed_string_size (boolean_label [system_privilege])));
    add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{   Generate the end_define_client command

    indent_line (initial_indent_column);
    add_to_line ('end_define_client');
    add_to_line (' save_definition=TRUE');
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND generate_client_definition_cmds;
?? OLDTITLE ??
?? NEWTITLE := 'generate_client_status_display', EJECT ??

  PROCEDURE generate_client_status_display
    (    client: nat$application_name;
     VAR status: ost$status);

    VAR
      active_connection_count: nat$number_of_connections,
      application_id: nat$internet_sap_identifier,
      attempted_connection_count: integer,
      client_status: nat$application_status,
      rejected_connection_attempts: integer,
      reserved_application_id: boolean;


    nap$get_client_status (client, client_status, reserved_application_id, application_id,
          active_connection_count, attempted_connection_count, rejected_connection_attempts, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    add_to_line ('Client: ');
    tab_line (display_spacer);
    add_to_line (client);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    add_to_line ('  Status: ');
    tab_line (display_spacer);
    add_to_line (application_status_description [client_status]);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    add_to_line ('  Active_client_connections: ');
    tab_line (display_spacer);
    add_integer_to_line (active_connection_count);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    add_to_line ('  Attempted_connection_count: ');
    tab_line (display_spacer);
    add_integer_to_line (attempted_connection_count);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    add_to_line ('  Rejected_connection_attempts: ');
    tab_line (display_spacer);
    add_integer_to_line (rejected_connection_attempts);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND generate_client_status_display;
?? OLDTITLE ??
?? NEWTITLE := 'generate_headers', EJECT ??

  PROCEDURE generate_headers
    (VAR display_control: {input,output} clt$display_control;
         page_number: integer;
     VAR status: ost$status);

{ PURPOSE: This procedure formats a page header for MANNA output.
{ DESIGN:  This procedure is called by the clp$display... routines when a page header
{          is needed. Note that this routine may be called in any of the tasks activated
{          by MANNA.

    CONST
      date_length = 18,
      long_date_start = 91,
      long_header_length = 132,
      long_os_version_start = 48,
      long_page_number_start = 127, {includes leading blank}
      long_page_title_start = 123,
      long_product_name_start = 55,
      long_product_version_start = 78,
      long_product_level_start = 85,
      long_time_start = 110,
      os_version_length = 6,
      page_number_length = 5, {includes leading blank}
      product_name = 'ADM NETWORK APPLICATIONS',
      product_name_length = 24,
      product_level_length = 5,
      product_version_length = 4,
      short_date_start = 1,
      short_header_length = 80,
      short_os_version_start = 20,
      short_page_number_start = 66, {includes leading blank}
      short_page_title_start = 62,
      short_product_name_start = 27,
      short_product_version_start = 52,
      short_product_level_start = 57,
      short_time_start = 49,
      time_length = 12;

    VAR
      date: ost$date,
      date_line: 1 .. 2,
      date_start: 0 .. long_header_length,
      header: array [1 .. 2] of string (long_header_length),
      header1_length: 0 .. long_header_length,
      header2_length: 0 .. long_header_length,
      j: integer,
      os_version: pmt$os_name,
      page_number_start: 0 .. long_header_length,
      str: string (10),
      time: ost$time,
      time_line: 1 .. 2,
      time_start: 0 .. long_header_length;

    pmp$get_legible_date_time (osc$default_date, date, osc$default_time, time, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    pmp$get_os_version (os_version, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    header [1] := ' ';
    header [2] := ' ';
    IF (display_control.page_width < long_header_length) THEN
      header1_length := short_header_length;
      header2_length := short_header_length;
      page_number_start := short_page_number_start;
      header [2] (short_os_version_start, os_version_length) := os_version;
      date_line := 2;
      date_start := short_date_start;
      time_line := 1;
      time_start := short_time_start;
      header [2] (short_product_name_start, product_name_length) := product_name;
      header [2] (short_product_version_start, product_version_length) := nac$network_administrator_vers;
      header [2] (short_product_level_start, product_level_length) := nac$network_administrator_level;
      header [1] (short_page_title_start, 4) := 'PAGE';
    ELSE
      header1_length := long_header_length;
      page_number_start := long_page_number_start;
      header [1] (long_os_version_start, os_version_length) := os_version;
      date_line := 1;
      date_start := long_date_start;
      time_line := 1;
      time_start := long_time_start;
      header [1] (long_product_name_start, product_name_length) := product_name;
      header [1] (long_product_version_start, product_version_length) := nac$network_administrator_vers;
      header [1] (long_product_level_start, product_level_length) := nac$network_administrator_level;
      header [1] (long_page_title_start, 4) := 'PAGE';
      header2_length := 0;
    IFEND;

    CASE date.date_format OF
    = osc$month_date =
      header [date_line] (date_start, date_length) := date.month;

    = osc$mdy_date =
      header [date_line] (date_start, date_length) := date.mdy;

    = osc$iso_date =
      header [date_line] (date_start, date_length) := date.iso;

    = osc$dmy_date =
      header [date_line] (date_start, date_length) := date.dmy;

    ELSE
    CASEND;

    CASE time.time_format OF
    = osc$ampm_time =
      header [time_line] (time_start, time_length) := time.ampm;

    = osc$hms_time =
      header [time_line] (time_start, time_length) := time.hms;

    = osc$millisecond_time =
      header [time_line] (time_start, time_length) := time.millisecond;

    ELSE
    CASEND;
    clp$reset_for_next_display_page (display_control, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (str, j, page_number);
    header [1] (page_number_start, j) := str (1, j);
    clp$put_display (display_control, header [1], clc$trim, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF (header2_length > 0) THEN
      clp$put_display (display_control, header [2], clc$trim, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    clp$new_display_line (display_control, 1, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND generate_headers;
?? OLDTITLE ??
?? NEWTITLE := 'generate_installed_client_def', EJECT ??

  PROCEDURE generate_installed_client_def
    (    client: nat$application_name;
     VAR status: ost$status);

    VAR
      application_id: nat$internet_sap_identifier,
      application_status: nat$application_status,
      capability: ost$name,
      connection_priority: nat$network_message_priority,
      max_connections: nat$number_of_connections,
      protocol: nat$protocol,
      reserved_application_id: boolean,
      ring: ost$ring,
      system_privilege: boolean;

    nap$get_client_attributes (client, application_status, max_connections, connection_priority, protocol,
          reserved_application_id, application_id, capability, ring, system_privilege, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    generate_client_definition_cmds (client, application_status, max_connections, connection_priority,
          capability, ring, system_privilege, reserved_application_id, application_id, protocol, status);

  PROCEND generate_installed_client_def;
?? OLDTITLE ??
?? NEWTITLE := 'generate_installed_server_def', EJECT ??

  PROCEDURE generate_installed_server_def
    (    server: nat$application_name;
     VAR status: ost$status);


    VAR
      accept_connection: boolean,
      application_id: nat$internet_sap_identifier,
      application_status: nat$application_status,
      capability: ost$name,
      client_capability: ost$name,
      client_info_source: nat$client_info_source,
      client_address: array [1 .. 1] of nat$client_address,
      client_addresses: ^array [1 .. * ] of nat$client_address,
      client_address_count: integer,
      connection_priority: nat$network_message_priority,
      max_connections: nat$number_of_connections,
      nam_initiated: boolean,
      protocol: nat$protocol,
      reserved_application_id: boolean,
      ring: ost$ring,
      selected_title: array [1 .. 1] of nat$selected_title,
      selected_titles: ^array [1 .. * ] of nat$selected_title,
      selected_title_count: nat$max_titles,
      server_managed_title: array [1 .. 1] of string (nac$max_title_pattern_length),
      server_managed_titles: ^nat$title_pattern_list,
      server_managed_title_count: nat$max_titles,
      server_job_specified: boolean,
      server_job: amt$local_file_name,
      server_job_validation_source: nat$server_validation_source,
      server_job_max_connections: nat$number_of_connections,
      system_privilege: boolean;

    server_job := '';
    nap$get_server_attributes (server, application_status, selected_title_count, ^selected_title,
          server_managed_title_count, ^server_managed_title, max_connections, connection_priority, capability,
          ring, system_privilege, accept_connection, client_capability, client_info_source,
          client_address_count, ^client_address, reserved_application_id, application_id, protocol,
          nam_initiated, server_job_validation_source, server_job_max_connections, server_job_specified,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    IF selected_title_count = 0 THEN
      selected_titles := NIL;
    ELSE
      selected_titles := ^selected_title;
    IFEND;
    IF server_managed_title_count = 0 THEN
      server_managed_titles := NIL;
    ELSE
      server_managed_titles := ^server_managed_title;
    IFEND;
    IF client_address_count = 0 THEN
      client_addresses := NIL;
    ELSE
      client_addresses := ^client_address;
    IFEND;
    IF (selected_title_count > 1) OR (client_address_count > 1) OR (server_managed_title_count > 1) THEN
      IF selected_title_count > 1 THEN
        PUSH selected_titles: [1 .. selected_title_count];
      IFEND;
      IF server_managed_title_count > 1 THEN
        PUSH server_managed_titles: [1 .. server_managed_title_count];
      IFEND;
      IF client_address_count > 1 THEN
        PUSH client_addresses: [1 .. client_address_count];
      IFEND;
      nap$get_server_attributes (server, application_status, selected_title_count, selected_titles,
            server_managed_title_count, server_managed_titles, max_connections, connection_priority,
            capability, ring, system_privilege, accept_connection, client_capability, client_info_source,
            client_address_count, client_addresses, reserved_application_id, application_id, protocol,
            nam_initiated, server_job_validation_source, server_job_max_connections, server_job_specified,
            status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF NOT server_job_specified THEN
      server_job := clc$null_file;
    IFEND;
    generate_server_definition_cmds (server, application_status, selected_titles, server_managed_titles,
          max_connections, connection_priority, capability, ring, system_privilege, accept_connection,
          client_capability, client_info_source, client_addresses, reserved_application_id, application_id,
          protocol, nam_initiated, {server_lfn_specified} NOT server_job_specified, server_job,
          server_job_validation_source, server_job_max_connections, status);

  PROCEND generate_installed_server_def;

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

  PROCEDURE generate_installed_tcpip_cmds
    (    tcpip: nat$application_name;
         max_sockets: nat$number_of_sockets;
         capability: ost$name;
         ring: ost$ring;
         system_privilege: boolean;
         protocol: nat$protocol;
     VAR status: ost$status);

    VAR
      current_indent_column: clt$command_line_index,
      i_string: ost$string,
      ignore_status: ost$status,
      length: integer,
      str: string (osc$max_string_size);

    status.normal := TRUE;
    current_indent_column := initial_indent_column;

{  Generate define_tcpip command.

    put_line (status); { blank line }
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    indent_line (current_indent_column);
    add_to_line ('define_tcpip_application');
    STRINGREP (str, length, ' application=', tcpip (1, clp$trimmed_string_size (tcpip)));
    add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    STRINGREP (str, length, ' protocol=', protocol_label [protocol]
          (1, clp$trimmed_string_size (protocol_label [protocol])));
    add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;


{  Generate define_tcpip subcommands that make up the tcpip definition.

    current_indent_column := initial_indent_column + indent_increment;

{   Maximum sockets

    indent_line (current_indent_column);
    add_to_line ('change_maximum_sockets');
    clp$convert_integer_to_string (max_sockets, 10, FALSE, i_string, ignore_status);
    STRINGREP (str, length, ' maximum_sockets=', i_string.value (1, i_string.size));
    add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{   capability / ring / system privilege

    indent_line (current_indent_column);
    add_to_line ('change_tcpip_validation');

    IF capability = osc$null_name THEN
      add_to_line_if_can ({last_parameter=} FALSE, ' capability=none', status);
    ELSE
      STRINGREP (str, length, ' capability=', capability (1, clp$trimmed_string_size (capability)));
      add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$convert_integer_to_string (ring, 10, FALSE, i_string, ignore_status);
    STRINGREP (str, length, ' ring=', i_string.value (1, i_string.size));
    add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (str, length, ' system_privilege=', boolean_label [system_privilege] (1,
          clp$trimmed_string_size (boolean_label [system_privilege])));
    add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{   Generate the end_define_tcpip command

    indent_line (initial_indent_column);
    add_to_line ('end_define_tcpip_application');
    add_to_line (' save_definition=TRUE');
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND generate_installed_tcpip_cmds;
?? OLDTITLE ??
?? NEWTITLE := 'generate_installed_tcpip_def', EJECT ??

  PROCEDURE generate_installed_tcpip_def
    (    tcpip: nat$application_name;
     VAR status: ost$status);

    VAR
      capability: ost$name,
      ignore_status: ost$status,
      local_status: ost$status,
      max_sockets: nat$number_of_sockets,
      priority: nat$network_message_priority,
      protocol: nat$protocol,
      ring: ost$ring,
      system_privilege: boolean,
      tcpip_status: nat$application_status;

    nap$get_tcpip_attributes (tcpip, tcpip_status, max_sockets, capability, ring, system_privilege, protocol,
          status);

    IF NOT status.normal THEN
      RETURN;
    IFEND;

    generate_installed_tcpip_cmds (tcpip, max_sockets, capability, ring, system_privilege, protocol, status);

  PROCEND generate_installed_tcpip_def;


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

  PROCEDURE generate_server_attrib_display
    (    server: nat$application_name;
         attributes: server_attribute_set;
         application_status: nat$application_status;
         selected_titles: ^array [1 .. * ] of nat$selected_title;
         server_managed_titles: ^nat$title_pattern_list;
         max_connections: nat$number_of_connections;
         connection_priority: nat$network_message_priority;
         capability: ost$name;
         ring: ost$ring;
         system_privilege: boolean;
         accept_connection: boolean;
         client_capability: ost$name;
         client_info_source: nat$client_info_source;
         client_addresses: ^array [1 .. * ] of nat$client_address;
         reserved_application_id: boolean;
         application_id: nat$internet_sap_identifier;
         protocol: nat$protocol;
         nam_initiated: boolean;
         server_job_specified: boolean;
         server_job: amt$local_file_name;
         server_job_validation_source: nat$server_validation_source;
         server_job_max_connections: nat$number_of_connections;
     VAR status: ost$status);

    VAR
      access_selections: [STATIC, READ] array [1 .. 2] of fst$attachment_option :=
            [[fsc$create_file, FALSE], [fsc$access_and_share_modes, [fsc$specific_access_modes, [fsc$read]],
            [fsc$specific_share_modes, [fsc$read, fsc$execute]]]],
      address_index: integer,
      byte_address: amt$file_byte_address,
      client_address_count: integer,
      cycle_selector: clt$cycle_selector,
      distributed_title_found: boolean,
      file: clt$file,
      file_name: ost$name,
      file_position: amt$file_position,
      file_reference: clt$file_reference,
      highest_cycle: [STATIC, READ] pft$cycle_selector := [pfc$highest_cycle],
      ignore_status: ost$status,
      indent_column: clt$command_line_index,
      j: integer,
      job_line: ^clt$command_line,
      length: integer,
      local_status: ost$status,
      open_position: clt$open_position,
      path: ^pft$path,
      path_container: clt$path_container,
      path_name: [STATIC] array [1 .. 6] of pft$name := [nac$application_family,
            nac$application_master_catalog, nac$network_subcatalog, nac$application_catalog,
            nac$application_job_catalog, * ],
      path_size: fst$path_size,
      path_string: fst$path,
      selected_title_count: nat$max_titles,
      server_file: clt$file,
      server_file_identifier: amt$file_identifier,
      server_file_reference: clt$file_reference,
      share_selections: [STATIC, READ] pft$usage_selections := [pfc$read],
      str: string (osc$max_string_size),
      title_data: string (nac$max_directory_data_length),
      title_pattern_count: nat$max_titles,
      transfer_count: amt$transfer_count,
      usage_selections: [STATIC, READ] pft$usage_selections := [pfc$read];


    add_to_line ('Server:');
    tab_line (display_spacer);
    add_to_line (server);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF sa$status IN attributes THEN
      indent_line (3);
      add_to_line ('Status: ');
      tab_line (display_spacer);
      add_to_line (application_status_description [application_status]);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF sa$protocol IN attributes THEN
      indent_line (3);
      add_to_line ('Protocol: ');
      tab_line (display_spacer);
      add_to_line (protocol_label [protocol]);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF sa$application_id IN attributes THEN
      indent_line (3);
      add_to_line ('Application_Identifier: ');
      tab_line (display_spacer);
      IF reserved_application_id THEN
        add_integer_to_line (application_id);
      ELSE
        add_to_line ('Variable');
      IFEND;
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF sa$max_connections IN attributes THEN
      indent_line (3);
      add_to_line ('Maximum_connections: ');
      tab_line (display_spacer);
      add_integer_to_line (max_connections);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF sa$connection_priority IN attributes THEN
      indent_line (3);
      add_to_line ('Connection_priority: ');
      tab_line (display_spacer);
      add_integer_to_line (connection_priority);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF sa$server_capability IN attributes THEN
      indent_line (3);
      add_to_line ('Server_capability: ');
      tab_line (display_spacer);
      IF capability = osc$null_name THEN
        add_to_line ('None');
      ELSE
        add_to_line (capability);
      IFEND;
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF sa$server_ring IN attributes THEN
      indent_line (3);
      add_to_line ('Server_ring: ');
      tab_line (display_spacer);
      add_integer_to_line (ring);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF sa$server_system_priv IN attributes THEN
      indent_line (3);
      add_to_line ('Server_system_privilege: ');
      tab_line (display_spacer);
      add_boolean_to_line (system_privilege);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF sa$title_attributes IN attributes THEN
      IF selected_titles = NIL THEN
        indent_line (3);
        add_to_line ('Titles: ');
        tab_line (display_spacer);
        add_to_line ('None');
        flush_line (status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      ELSE
        selected_title_count := UPPERBOUND (selected_titles^);
        FOR j := 1 TO selected_title_count DO
          indent_line (3);
          add_to_line ('Title: ');
          tab_line (display_spacer);
          add_to_line (selected_titles^ [j].title (1, clp$trimmed_string_size (selected_titles^ [j].title)));
          display_wide_line (line.value (1, line.size), status);
          line.size := 0;
          IF NOT status.normal THEN
            RETURN;
          IFEND;
          indent_line (5);
          add_to_line ('Broadcast_registration:');
          tab_line (display_spacer);
          add_boolean_to_line (selected_titles^ [j].distribute_title);
          flush_line (status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
          indent_line (5);
          add_to_line ('Title_priority:');
          tab_line (display_spacer);
          add_integer_to_line (selected_titles^ [j].priority);
          flush_line (status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
          indent_line (5);
          add_to_line ('Title_data:');
          IF selected_titles^ [j].data_length = 0 THEN
            tab_line (display_spacer);
            add_to_line ('None');
            flush_line (status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
          ELSE
            i#move (^selected_titles^ [j].data, ^title_data, selected_titles^ [j].data_length);
            tab_line (display_spacer);
            STRINGREP (str, length, '''', title_data (1, selected_titles^ [j].data_length), '''');
            add_to_line (str (1, length));
            flush_line (status);
            IF NOT status.normal THEN
              RETURN;
            IFEND;
          IFEND;
        FOREND;
      IFEND;
    ELSEIF sa$titles IN attributes THEN
      indent_line (3);
      add_to_line ('Titles: ');
      IF selected_titles = NIL THEN
        tab_line (display_spacer);
        add_to_line ('None');
        flush_line (status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      ELSE
        selected_title_count := UPPERBOUND (selected_titles^);
        FOR j := 1 TO selected_title_count DO
          tab_line (display_spacer);
          add_to_line (selected_titles^ [j].title (1, clp$trimmed_string_size (selected_titles^ [j].title)));
          display_wide_line (line.value (1, line.size), status);
          line.size := 0;
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        FOREND;
      IFEND;
    IFEND;

    IF sa$server_managed_titles IN attributes THEN
      indent_line (3);
      add_to_line ('Server_managed_titles: ');
      IF server_managed_titles = NIL THEN
        tab_line (display_spacer);
        add_to_line ('None');
        flush_line (status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      ELSE
        title_pattern_count := UPPERBOUND (server_managed_titles^);
        FOR j := 1 TO title_pattern_count DO
          tab_line (display_spacer);
          add_to_line (server_managed_titles^ [j] (1, clp$trimmed_string_size (server_managed_titles^ [j])));
          display_wide_line (line.value (1, line.size), status);
          line.size := 0;
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        FOREND;
      IFEND;
    IFEND;

    IF sa$accept_connections IN attributes THEN
      indent_line (3);
      add_to_line ('Accept_connection: ');
      tab_line (display_spacer);
      add_boolean_to_line (accept_connection);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF sa$client_validation IN attributes THEN
      indent_line (3);
      add_to_line ('Client_validation: ');
      tab_line (display_spacer);
      IF client_capability = osc$null_name THEN
        add_to_line ('None');
      ELSE
        add_to_line (client_capability);
      IFEND;
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF sa$client_info_source IN attributes THEN
      indent_line (3);
      add_to_line ('Client_information_source: ');
      tab_line (display_spacer);
      add_to_line (client_info_label [client_info_source]);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF sa$client_addresses IN attributes THEN
      indent_line (3);
      add_to_line ('Client_addresses: ');
      IF client_addresses = NIL THEN
        client_address_count := 0;
        tab_line (display_spacer);
        add_to_line ('all addresses');
        flush_line (status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      ELSE
        client_address_count := UPPERBOUND (client_addresses^);
        FOR j := 1 TO client_address_count DO
          tab_line (display_spacer);
          IF client_addresses^ [j].network_id = 0 THEN
            add_to_line ('all networks, ');
          ELSE
            add_integer_to_line (client_addresses^ [j].network_id);
            add_to_line (', ');
          IFEND;
          IF (client_addresses^ [j].system_id = 0) OR (client_addresses^ [j].system_kind <>
                nac$any_system_kind) THEN
            add_to_line (client_system_kind [client_addresses^ [j].system_kind] (1,
                  clp$trimmed_string_size (client_system_kind [client_addresses^ [j].system_kind])));
            add_to_line (' systems, ');
          ELSE
            add_integer_to_line (client_addresses^ [j].system_id);
            add_to_line (', ');
          IFEND;
          IF client_addresses^ [j].reserved_application_id THEN
            add_integer_to_line (client_addresses^ [j].application_id);
          ELSE
            add_to_line ('all application identifiers');
          IFEND;
          flush_line (status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        FOREND;
      IFEND;
    IFEND;

    IF sa$nam_initiated IN attributes THEN
      indent_line (3);
      add_to_line ('NAM_Initiated: ');
      tab_line (display_spacer);
      add_boolean_to_line (nam_initiated);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF nam_initiated AND (sa$server_job_val_source IN attributes) THEN
      indent_line (3);
      add_to_line ('Server_job_validation_source: ');
      tab_line (display_spacer);
      add_to_line (validation_source_label [server_job_validation_source]);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF nam_initiated AND (sa$server_job_max_connections IN attributes) THEN
      indent_line (3);
      add_to_line ('Server_job_maximum_connections: ');
      tab_line (display_spacer);
      add_integer_to_line (server_job_max_connections);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF nam_initiated AND (sa$server_job IN attributes) THEN
      IF server_job_specified THEN
        fsp$open_file (server_job, amc$record, ^access_selections, {default_creation_attributes=} NIL,
              {mandated_creation_attributes=} NIL, {attribute_validation=} NIL, {attribute_override=} NIL,
              server_file_identifier, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        server_file.local_file_name := server_job;
        clp$get_path_description (server_file, server_file_reference, path_container, path, cycle_selector,
              open_position, status);
        IF NOT status.normal THEN
          fsp$close_file (server_file_identifier, ignore_status);
          RETURN;
        IFEND;
        indent_line (3);
        add_to_line ('Server_job: ');
        tab_line (display_spacer);
        add_to_line (server_file_reference.path_name (1, server_file_reference.path_name_size));
        flush_line (status);
      ELSE
        path_name [UPPERBOUND (path_name)] := server;
        nap$open_server_job_file (server, server_file_identifier, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        pfp$convert_pf_path_to_fs_path (path_name, path_string, path_size);
        indent_line (3);
        add_to_line ('Server_job: ');
        tab_line (display_spacer);
        add_to_line (path_string (1, path_size));
        flush_line (status);
      IFEND;
      IF status.normal THEN
        PUSH job_line: [clc$max_command_line_size];
        amp$get_next (server_file_identifier, job_line, #SIZE (job_line^), transfer_count, byte_address,
              file_position, status);
        WHILE status.normal AND (file_position <> amc$eoi) DO
          job_line^ (5, * ) := job_line^ (1, transfer_count);
          job_line^ (1, 4) := ' '; {indent_line}
          display_wide_line (job_line^ (1, transfer_count + 4), status);
          IF status.normal THEN
            amp$get_next (server_file_identifier, job_line, #SIZE (job_line^), transfer_count, byte_address,
                  file_position, status);
          IFEND;
        WHILEND;
      IFEND;
      IF server_job_specified THEN
        fsp$close_file (server_file_identifier, local_status);
      ELSE
        nap$close_server_job_file (server_file_identifier, local_status);
      IFEND;
      IF NOT local_status.normal AND status.normal THEN
        status := local_status;
      IFEND;
    IFEND;

  PROCEND generate_server_attrib_display;
?? OLDTITLE ??
?? NEWTITLE := 'generate_server_definition_cmds', EJECT ??

  PROCEDURE generate_server_definition_cmds
    (    server: nat$application_name;
         application_status: nat$application_status;
         selected_titles: ^array [1 .. * ] of nat$selected_title;
         server_managed_titles: ^nat$title_pattern_list;
         max_connections: nat$number_of_connections;
         connection_priority: nat$network_message_priority;
         capability: ost$name;
         ring: ost$ring;
         system_privilege: boolean;
         accept_connection: boolean;
         client_capability: ost$name;
         client_info_source: nat$client_info_source;
         client_addresses: ^array [1 .. * ] of nat$client_address;
         reserved_application_id: boolean;
         application_id: nat$internet_sap_identifier;
         protocol: nat$protocol;
         nam_initiated: boolean;
         server_job_specified: boolean;
         server_job: amt$local_file_name;
         server_job_validation_source: nat$server_validation_source;
         server_job_max_connections: nat$number_of_connections;
     VAR status: ost$status);

    VAR
      access_selections: [STATIC, READ] array [1 .. 2] of fst$attachment_option :=
            [[fsc$create_file, FALSE], [fsc$access_and_share_modes, [fsc$specific_access_modes, [fsc$read]],
            [fsc$specific_share_modes, [fsc$read, fsc$execute]]]],
      byte_address: amt$file_byte_address,
      client_address_count: integer,
      current_indent_column: clt$command_line_index,
      file: clt$file,
      file_name: ost$name,
      file_position: amt$file_position,
      highest_cycle: [STATIC, READ] pft$cycle_selector := [pfc$highest_cycle],
      i_string: ost$string,
      ignore_status: ost$status,
      j: integer,
      job_line: ^clt$command_line,
      line_size: clt$command_line_size,
      length: integer,
      local_status: ost$status,
      path_name: [STATIC] array [1 .. 6] of pft$name := [nac$application_family,
            nac$application_master_catalog, nac$network_subcatalog, nac$application_catalog,
            nac$application_job_catalog, * ],
      selected_title_count: nat$max_titles,
      server_file_identifier: amt$file_identifier,
      server_managed_title_count: nat$max_titles,
      share_selections: [STATIC, READ] pft$usage_selections := [pfc$read],
      str: string (osc$max_string_size),
      title_data: string (nac$max_directory_data_length),
      transfer_count: amt$transfer_count,
      unique_name: ost$name,
      usage_selections: [STATIC, READ] pft$usage_selections := [pfc$read];

    status.normal := TRUE;
    current_indent_column := initial_indent_column;

{  Generate define_server command.

    put_line (status); { blank line }
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    indent_line (current_indent_column);
    add_to_line ('define_server');
    STRINGREP (str, length, ' server=', server (1, clp$trimmed_string_size (server)));
    add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    STRINGREP (str, length, ' protocol=', protocol_label [protocol]
          (1, clp$trimmed_string_size (protocol_label [protocol])));
    add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    STRINGREP (str, length, ' nam_initiated=', boolean_label
          [nam_initiated] (1, clp$trimmed_string_size (boolean_label [nam_initiated])));
    add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{  Generate define_server subcommands that make up the server definition.

    current_indent_column := initial_indent_column + indent_increment;

{   Application identifier

    indent_line (current_indent_column);
    add_to_line ('change_application_identifier');
    IF reserved_application_id THEN
      clp$convert_integer_to_string (application_id, 10, FALSE, i_string, ignore_status);
      STRINGREP (str, length, ' application_identifier=', i_string.value (1, i_string.size));
      add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    ELSE
      add_to_line_if_can ({last_parameter=} TRUE, ' application_identifier=variable', status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{   Maximum connections

    indent_line (current_indent_column);
    add_to_line ('change_maximum_connections');
    clp$convert_integer_to_string (max_connections, 10, FALSE, i_string, ignore_status);
    STRINGREP (str, length, ' maximum_connections=', i_string.value (1, i_string.size));
    add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{   Connection priority

    indent_line (current_indent_column);
    add_to_line ('change_connection_priority');
    clp$convert_integer_to_string (connection_priority, 10, FALSE, i_string, ignore_status);
    STRINGREP (str, length, ' connection_priority=', i_string.value (1, i_string.size));
    add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{   Server capability / Server ring / Server system privilege

    indent_line (current_indent_column);
    add_to_line ('change_server_validation');

    IF capability = osc$null_name THEN
      add_to_line_if_can ({last_parameter=} FALSE, ' capability=none', status);
    ELSE
      STRINGREP (str, length, ' capability=', capability (1, clp$trimmed_string_size (capability)));
      add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$convert_integer_to_string (ring, 10, FALSE, i_string, ignore_status);
    STRINGREP (str, length, ' ring=', i_string.value (1, i_string.size));
    add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    STRINGREP (str, length, ' system_privilege=', boolean_label [system_privilege] (1,
          clp$trimmed_string_size (boolean_label [system_privilege])));
    add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{   Titles / Title attributes

    IF selected_titles <> NIL THEN
      selected_title_count := UPPERBOUND (selected_titles^);
      FOR j := 1 TO selected_title_count DO
        indent_line (current_indent_column);
        add_to_line ('add_title');
        add_to_line (' title=''');
        add_string_to_line ({last_parameter=} FALSE, selected_titles^
              [j].title (1, clp$trimmed_string_size (selected_titles^ [j].title)), status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        add_string_to_line ({last_parameter=} FALSE, '''', status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        STRINGREP (str, length, ' broadcast_registration=',
              boolean_label [selected_titles^ [j].distribute_title]
              (1, clp$trimmed_string_size (boolean_label [selected_titles^ [j].distribute_title])));
        add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        clp$convert_integer_to_string (selected_titles^ [j].priority, 10, FALSE, i_string, ignore_status);
        STRINGREP (str, length, ' priority=', i_string.value (1, i_string.size));
        add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        IF selected_titles^ [j].data_length <> 0 THEN
          i#move (^selected_titles^ [j].data, ^title_data, selected_titles^ [j].data_length);
          STRINGREP (str, length, ' data=''', title_data (1, selected_titles^ [j].data_length), '''');
          add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        IFEND;
        put_line (status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      FOREND;
    IFEND;

{   Server managed titles

    IF server_managed_titles <> NIL THEN
      server_managed_title_count := UPPERBOUND (server_managed_titles^);
      FOR j := 1 TO server_managed_title_count DO
        indent_line (current_indent_column);
        add_to_line ('add_server_managed_title');
        add_to_line (' title_pattern=''');
        add_string_to_line ({last_parameter=} FALSE, server_managed_titles^
              [j] (1, clp$trimmed_string_size (server_managed_titles^ [j])), status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        add_string_to_line ({last_parameter=} FALSE, '''', status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        put_line (status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      FOREND;
    IFEND;

{   Accept connection

    indent_line (current_indent_column);
    add_to_line ('change_accept_connection');
    STRINGREP (str, length, ' accept_connection=', boolean_label [accept_connection] (1,
          clp$trimmed_string_size (boolean_label [accept_connection])));
    add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{   Client validation

    indent_line (current_indent_column);
    add_to_line ('change_client_validation');
    IF client_capability = osc$null_name THEN
      add_to_line_if_can ({last_parameter=} TRUE, ' capability=none', status);
    ELSE
      STRINGREP (str, length, ' capability=', client_capability
            (1, clp$trimmed_string_size (client_capability)));
      add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{   Client information source

    indent_line (current_indent_column);
    add_to_line ('change_client_info_source');
    STRINGREP (str, length, ' source=', client_info_label [client_info_source]);
    add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{   Client addresses

    IF client_addresses <> NIL THEN
      client_address_count := UPPERBOUND (client_addresses^);
      FOR j := 1 TO client_address_count DO
        indent_line (current_indent_column);
        add_to_line ('add_client_address');
        IF client_addresses^ [j].network_id = 0 THEN
          add_to_line_if_can ({last_parameter=} FALSE, ' network_identifier=all', status);
        ELSE
          clp$convert_integer_to_string (client_addresses^ [j].network_id, 10, FALSE, i_string,
                ignore_status);
          STRINGREP (str, length, ' network_identifier=', i_string.value (1, i_string.size));
          add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
        IFEND;
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        IF (client_addresses^ [j].system_id = 0) OR (client_addresses^ [j].system_kind <>
              nac$any_system_kind) THEN
          STRINGREP (str, length, ' system_identifier=', client_system_kind
                [client_addresses^ [j].system_kind] (1, clp$trimmed_string_size
                (client_system_kind [client_addresses^ [j].system_kind])));
        ELSE
          clp$convert_integer_to_string (client_addresses^ [j].system_id, 10, FALSE, i_string, ignore_status);
          STRINGREP (str, length, ' system_identifier=', i_string.value (1, i_string.size));
        IFEND;
        add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        IF client_addresses^ [j].reserved_application_id THEN
          clp$convert_integer_to_string (client_addresses^ [j].application_id, 10, FALSE, i_string,
                ignore_status);
          STRINGREP (str, length, ' application_identifier=', i_string.value (1, i_string.size));
          add_to_line_if_can ({last_parameter=} TRUE, str (1, length), status);
        ELSE
          add_to_line_if_can ({last_parameter=} TRUE, ' application_identifier=all', status);
        IFEND;
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        put_line (status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      FOREND;
    IFEND;

{   Server job / Server job validation source / Server job maximum connections

    IF nam_initiated THEN
      indent_line (current_indent_column);
      add_to_line ('change_server_job');
      STRINGREP (str, length, ' validation_source=', validation_source_label [server_job_validation_source]
            (1, 6)); {trims 'server job' to 'server'}
      add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      clp$convert_integer_to_string (server_job_max_connections, 10, FALSE, i_string, ignore_status);
      STRINGREP (str, length, ' maximum_connections=', i_string.value (1, i_string.size));
      add_to_line_if_can ({last_parameter=} (server_job = clc$null_file), str (1, length), status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      IF server_job <> clc$null_file THEN
        IF server_job_specified THEN
          fsp$open_file (server_job, amc$record, ^access_selections, {default_creation_attributes=} NIL,
                {mandated_creation_attributes=} NIL, {attribute_validation=} NIL, {attribute_override=} NIL,
                server_file_identifier, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        ELSE
          nap$open_server_job_file (server, server_file_identifier, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        IFEND;
        STRINGREP (str, length, ' job=', command_file);
        add_to_line_if_can ({last_parameter=} FALSE, str (1, length), status);
        IF NOT status.normal THEN
          IF server_job_specified THEN
            fsp$close_file (server_file_identifier, ignore_status);
          ELSE
            nap$close_server_job_file (server_file_identifier, ignore_status);
          IFEND;
          RETURN;
        IFEND;

        add_to_line_if_can ({last_parameter=} TRUE, ' include_commands_until=''END_SERVER_JOB''', status);
        IF NOT status.normal THEN
          IF server_job_specified THEN
            fsp$close_file (server_file_identifier, ignore_status);
          ELSE
            nap$close_server_job_file (server_file_identifier, ignore_status);
          IFEND;
          RETURN;
        IFEND;
      IFEND;
      put_line (status);
      IF NOT status.normal THEN
        IF server_job_specified THEN
          fsp$close_file (server_file_identifier, ignore_status);
        ELSE
          nap$close_server_job_file (server_file_identifier, ignore_status);
        IFEND;
        RETURN;
      IFEND;

{  Get the server job commands

      IF server_job <> clc$null_file THEN
        PUSH job_line: [clc$max_command_line_size];
        current_indent_column := initial_indent_column;
        amp$get_next (server_file_identifier, job_line, #SIZE (job_line^), transfer_count, byte_address,
              file_position, status);
        WHILE status.normal AND (file_position <> amc$eoi) DO
          indent_line (current_indent_column);
          amp$put_partial (output_file_id, ^line.value, line.size, byte_address, amc$start, status);
          IF status.normal THEN
            amp$put_partial (output_file_id, job_line, transfer_count, byte_address, amc$terminate, status);
            IF status.normal THEN
              amp$get_next (server_file_identifier, job_line, #SIZE (job_line^), transfer_count, byte_address,
                    file_position, status);
            IFEND;
          IFEND;
        WHILEND;
        IF status.normal THEN
          indent_line (initial_indent_column);
          add_to_line ('END_SERVER_JOB');
          put_line (status);
        IFEND;
        IF server_job_specified THEN
          fsp$close_file (server_file_identifier, local_status);
        ELSE
          nap$close_server_job_file (server_file_identifier, local_status);
        IFEND;
        IF NOT local_status.normal AND status.normal THEN
          status := local_status;
        IFEND;
      IFEND;
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

{   Generate the end_define_server command

    indent_line (initial_indent_column);
    add_to_line ('end_define_server');
    add_to_line (' save_definition=TRUE');
    put_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND generate_server_definition_cmds;
?? OLDTITLE ??
?? NEWTITLE := 'generate_server_status_display', EJECT ??

  PROCEDURE generate_server_status_display
    (    server: nat$application_name;
     VAR status: ost$status);

    VAR
      active_connection_count: nat$number_of_connections,
      active_job_count: integer,
      application_id: nat$internet_sap_identifier,
      attempted_connection_count: integer,
      attributes: array [1 .. 1] of nat$display_job_attributes,
      attribute_list: ^array [1 .. * ] of nat$display_job_attributes,
      i: integer,
      j: integer,
      rejected_connection_attempts: integer,
      reserved_application_id: boolean,
      server_added_title_count: nat$max_titles,
      server_added_title: array [1 .. 1] of string (nac$max_title_length),
      server_added_titles: ^array [1 .. * ] of string (nac$max_title_length),
      server_status: nat$application_status;


    nap$get_server_status (server, server_status, reserved_application_id, application_id, active_job_count,
          attributes, active_connection_count, attempted_connection_count, rejected_connection_attempts,
          server_added_title_count, server_added_title, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    add_to_line ('Server: ');
    tab_line (display_spacer);
    add_to_line (server);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    add_to_line ('  Status: ');
    tab_line (display_spacer);
    add_to_line (application_status_description [server_status]);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    add_to_line ('  Active_server_connections: ');
    tab_line (display_spacer);
    add_integer_to_line (active_connection_count);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    add_to_line ('  Attempted_connection_count: ');
    tab_line (display_spacer);
    add_integer_to_line (attempted_connection_count);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    add_to_line ('  Rejected_connection_attempts: ');
    tab_line (display_spacer);
    add_integer_to_line (rejected_connection_attempts);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    add_to_line ('  Server_added_titles: ');
    IF server_added_title_count = 0 THEN
      tab_line (display_spacer);
      add_to_line ('None');
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    ELSEIF server_added_title_count = 1 THEN
      tab_line (display_spacer);
      add_to_line (server_added_title [1] (1, clp$trimmed_string_size (server_added_title [1])));
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    ELSE
      PUSH server_added_titles: [1 .. server_added_title_count];
      nap$get_server_status (server, server_status, reserved_application_id, application_id, active_job_count,
            attributes, active_connection_count, attempted_connection_count, rejected_connection_attempts,
            server_added_title_count, server_added_titles^, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      FOR i := 1 TO server_added_title_count DO
        tab_line (display_spacer);
        add_to_line (server_added_titles^ [i] (1, clp$trimmed_string_size (server_added_titles^ [i])));
        flush_line (status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      FOREND;
    IFEND;

    add_to_line ('  Active_server_jobs: ');
    tab_line (display_spacer);
    add_integer_to_line (active_job_count);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF active_job_count > 0 THEN
      add_to_line ('    Job name            Connections');
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      IF active_job_count = 1 THEN
        tab_line (3);
        add_to_line (attributes [1].job_name);
        tab_line (32);
        add_integer_to_line (attributes [1].connection_count);
        flush_line (status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      ELSE
        PUSH attribute_list: [1 .. active_job_count];
        nap$get_server_status (server, server_status, reserved_application_id, application_id,
              active_job_count, attribute_list^, active_connection_count, attempted_connection_count,
              rejected_connection_attempts, server_added_title_count, server_added_title, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        FOR i := 1 TO active_job_count DO
          tab_line (3);
          add_to_line (attribute_list^ [i].job_name);
          tab_line (32);
          add_integer_to_line (attribute_list^ [i].connection_count);
          flush_line (status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        FOREND;
      IFEND;
    IFEND;

  PROCEND generate_server_status_display;
?? OLDTITLE ??
?? NEWTITLE := 'generate_tcpip_attrib_display', EJECT ??

  PROCEDURE generate_tcpip_attrib_display
    (    tcpip: nat$application_name;
         attributes: tcpip_attribute_set;
         max_sockets: nat$number_of_sockets;
         capability: ost$name;
         ring: ost$ring;
         system_privilege: boolean;
         protocol: nat$protocol;
     VAR status: ost$status);


    add_to_line ('TCP/IP:');
    tab_line (display_spacer);
    add_to_line (tcpip);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF ta$protocol IN attributes THEN
      indent_line (3);
      add_to_line ('Protocol: ');
      tab_line (display_spacer);
      add_to_line (protocol_label [protocol]);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF ta$maximum_sockets IN attributes THEN
      indent_line (3);
      add_to_line ('Maximum_sockets: ');
      tab_line (display_spacer);
      add_integer_to_line (max_sockets);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF ta$capability IN attributes THEN
      indent_line (3);
      add_to_line ('Capability: ');
      tab_line (display_spacer);
      IF capability = osc$null_name THEN
        add_to_line ('None');
      ELSE
        add_to_line (capability);
      IFEND;
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF ta$ring IN attributes THEN
      indent_line (3);
      add_to_line ('Ring: ');
      tab_line (display_spacer);
      add_integer_to_line (ring);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

    IF ta$system_privilege IN attributes THEN
      indent_line (3);
      add_to_line ('System_privilege: ');
      tab_line (display_spacer);
      add_boolean_to_line (system_privilege);
      flush_line (status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

  PROCEND generate_tcpip_attrib_display;

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

  PROCEDURE generate_tcpip_status_display
    (    tcpip: nat$application_name;
     VAR status: ost$status);

    VAR
      active_socket_count: nat$number_of_sockets,
      assign_socket_attempts: integer,
      i: integer,
      index: integer,
      ignore_status: ost$status,
      j: integer,
      output_length: integer,
      output_string: string (255),
      socket_requests_rejected: integer,
      tcpip_status: nat$application_status;


    nap$get_tcpip_status (tcpip, tcpip_status, active_socket_count, assign_socket_attempts,
          socket_requests_rejected, status);

    IF NOT status.normal THEN
      RETURN;
    IFEND;
    add_to_line ('TCP/IP: ');
    tab_line (display_spacer);
    add_to_line (tcpip);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    add_to_line ('  Status: ');
    tab_line (display_spacer);
    add_to_line (application_status_description [tcpip_status]);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    add_to_line ('  Active_TCP/IP_sockets: ');
    tab_line (display_spacer);
    add_integer_to_line (active_socket_count);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    add_to_line ('  Assign TCP/IP socket attempts: ');
    tab_line (display_spacer);
    add_integer_to_line (assign_socket_attempts);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    add_to_line ('  TCP/IP rejected requests: ');
    tab_line (display_spacer);
    add_integer_to_line (socket_requests_rejected);
    flush_line (status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND generate_tcpip_status_display;
?? OLDTITLE ??
?? NEWTITLE := 'process_client_attrib_parameter', EJECT ??

  PROCEDURE process_client_attrib_parameter
    (    display_options: clt$parameter_value;
     VAR attributes: client_attribute_set;
     VAR status: ost$status);

    VAR
      attributes_ptr: ^clt$data_value,
      keyword_value: clt$keyword;

    attributes := $client_attribute_set [];
    attributes_ptr := display_options.value;

    WHILE attributes_ptr <> NIL DO
      keyword_value := attributes_ptr^.element_value^.keyword_value;
      IF (keyword_value = 'ALL') THEN
        attributes := -$client_attribute_set [];
      ELSEIF (keyword_value = 'PROTOCOL') THEN
        attributes := attributes + $client_attribute_set [ca$protocol];
      ELSEIF (keyword_value = 'APPLICATION_IDENTIFIER') THEN
        attributes := attributes + $client_attribute_set [ca$application_id];
      ELSEIF (keyword_value = 'MAXIMUM_CONNECTIONS') THEN
        attributes := attributes + $client_attribute_set [ca$max_connections];
      ELSEIF (keyword_value = 'CONNECTION_PRIORITY') THEN
        attributes := attributes + $client_attribute_set [ca$connection_priority];
      ELSEIF (keyword_value = 'CLIENT_CAPABILITY') THEN
        attributes := attributes + $client_attribute_set [ca$client_capability];
      ELSEIF (keyword_value = 'CLIENT_RING') THEN
        attributes := attributes + $client_attribute_set [ca$client_ring];
      ELSEIF (keyword_value = 'CLIENT_STATUS') THEN
        attributes := attributes + $client_attribute_set [ca$status];
      ELSEIF (keyword_value = 'CLIENT_SYSTEM_PRIVILEGE') THEN
        attributes := attributes + $client_attribute_set [ca$client_system_priv];
      ELSE
        osp$set_status_abnormal (nac$status_id, nae$invalid_client_attribute, keyword_value, status);
        RETURN;
      IFEND;
      attributes_ptr := attributes_ptr^.link;
    WHILEND;

  PROCEND process_client_attrib_parameter;
?? OLDTITLE ??
?? NEWTITLE := 'process_output_file', EJECT ??

  PROCEDURE process_output_file
    (    output_file_name: fst$file_reference;
     VAR status: ost$status);

    CONST
      min_page_width = 65;

    VAR
      default_creation_attributes: [STATIC] array [1 .. 1] of fst$file_cycle_attribute :=
            [[fsc$file_contents_and_processor, fsc$legible_data, fsc$unknown_processor]],
      file_attachment: [STATIC] array [1 .. 3] of fst$attachment_option :=
            [[fsc$access_and_share_modes, [fsc$specific_access_modes, [fsc$shorten, fsc$append]],
            [fsc$specific_share_modes, []]], [fsc$access_and_share_modes,
            [fsc$specific_access_modes, [fsc$append]], [fsc$specific_share_modes, []]],
            [fsc$open_share_modes, -$fst$file_access_options []]],
      ignore_status: ost$status,
      output_file_attributes: array [1 .. 2] of amt$fetch_item;

    status.normal := TRUE;

    fsp$open_file (output_file_name, amc$record, ^file_attachment, ^default_creation_attributes,
          {mandated_creation_attributes =} NIL, {attribute_validation =} NIL, {attribute_override =} NIL,
          output_file_id, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    output_file_attributes [1].key := amc$page_width;
    output_file_attributes [2].key := amc$file_contents;
    amp$fetch (output_file_id, output_file_attributes, status);
    IF NOT status.normal THEN
      fsp$close_file (output_file_id, ignore_status);
      RETURN;
    IFEND;
    IF (output_file_attributes [1].source <> amc$undefined_attribute) THEN
      IF output_file_attributes [1].page_width > max_line_width THEN
        page_width := max_line_width;
      ELSEIF output_file_attributes [1].page_width < min_page_width THEN
        osp$set_status_condition (nae$page_width_too_small, status);
        osp$append_status_integer (osc$status_parameter_delimiter, min_page_width, 10, FALSE, status);
        fsp$close_file (output_file_id, ignore_status);
        RETURN;
      ELSE
        page_width := output_file_attributes [1].page_width;
      IFEND;
    ELSE
      page_width := min_page_width;
    IFEND;

    IF (output_file_attributes [2].file_contents = 'LIST') THEN
      initial_indent_column := 2;
    ELSE
      initial_indent_column := 1;
    IFEND;

  PROCEND process_output_file;
?? OLDTITLE ??
?? NEWTITLE := 'process_output_parameter', EJECT ??

  PROCEDURE process_output_parameter
    (    parameter_value: clt$parameter_value;
     VAR output_specified: boolean;
     VAR status: ost$status);

    VAR
      default_ring_attributes: amt$ring_attributes;

    output_specified := parameter_value.specified;

    IF output_specified THEN
      default_ring_attributes.r1 := #RING (^default_ring_attributes);
      default_ring_attributes.r2 := #RING (^default_ring_attributes);
      default_ring_attributes.r3 := #RING (^default_ring_attributes);

      clp$open_display_reference (parameter_value.value^.file_value^, ^generate_headers, fsc$list,
            default_ring_attributes, local_display_control, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      current_display_control := ^local_display_control;
    ELSE
      current_display_control := ^output_control;
    IFEND;
    IF current_display_control^.page_width < clc$narrow_page_width THEN
      page_width := clc$narrow_page_width;
    ELSEIF current_display_control^.page_width > clc$wide_page_width THEN
      page_width := clc$wide_page_width;
    ELSE
      page_width := current_display_control^.page_width;
    IFEND;

  PROCEND process_output_parameter;
?? OLDTITLE ??
?? NEWTITLE := 'process_server_attrib_parameter', EJECT ??

  PROCEDURE process_server_attrib_parameter
    (    display_options: clt$parameter_value;
     VAR attributes: server_attribute_set;
     VAR status: ost$status);

    VAR
      attributes_ptr: ^clt$data_value,
      keyword_value: clt$keyword;

    attributes := $server_attribute_set [];

    attributes_ptr := display_options.value;

    WHILE attributes_ptr <> NIL DO
      keyword_value := attributes_ptr^.element_value^.keyword_value;
      IF (keyword_value = 'ALL') THEN
        attributes := -$server_attribute_set [];
      ELSEIF (keyword_value = 'PROTOCOL') THEN
        attributes := attributes + $server_attribute_set [sa$protocol];
      ELSEIF (keyword_value = 'NAM_INITIATED') THEN
        attributes := attributes + $server_attribute_set [sa$nam_initiated];
      ELSEIF (keyword_value = 'TITLES') THEN
        attributes := attributes + $server_attribute_set [sa$titles];
      ELSEIF (keyword_value = 'TITLE_ATTRIBUTES') THEN
        attributes := attributes + $server_attribute_set [sa$title_attributes];
      ELSEIF (keyword_value = 'SERVER_MANAGED_TITLES') THEN
        attributes := attributes + $server_attribute_set [sa$server_managed_titles];
      ELSEIF (keyword_value = 'APPLICATION_IDENTIFIER') THEN
        attributes := attributes + $server_attribute_set [sa$application_id];
      ELSEIF (keyword_value = 'MAXIMUM_CONNECTIONS') THEN
        attributes := attributes + $server_attribute_set [sa$max_connections];
      ELSEIF (keyword_value = 'CONNECTION_PRIORITY') THEN
        attributes := attributes + $server_attribute_set [sa$connection_priority];
      ELSEIF (keyword_value = 'SERVER_CAPABILITY') THEN
        attributes := attributes + $server_attribute_set [sa$server_capability];
      ELSEIF (keyword_value = 'SERVER_RING') THEN
        attributes := attributes + $server_attribute_set [sa$server_ring];
      ELSEIF (keyword_value = 'SERVER_STATUS') THEN
        attributes := attributes + $server_attribute_set [sa$status];
      ELSEIF (keyword_value = 'SERVER_SYSTEM_PRIVILEGE') THEN
        attributes := attributes + $server_attribute_set [sa$server_system_priv];
      ELSEIF (keyword_value = 'SERVER_JOB') THEN
        attributes := attributes + $server_attribute_set [sa$server_job];
      ELSEIF (keyword_value = 'SERVER_JOB_VALIDATION_SOURCE') THEN
        attributes := attributes + $server_attribute_set [sa$server_job_val_source];
      ELSEIF (keyword_value = 'SERVER_JOB_MAXIMUM_CONNECTIONS') THEN
        attributes := attributes + $server_attribute_set [sa$server_job_max_connections];
      ELSEIF (keyword_value = 'ACCEPT_CONNECTION') THEN
        attributes := attributes + $server_attribute_set [sa$accept_connections];
      ELSEIF (keyword_value = 'CLIENT_VALIDATION') THEN
        attributes := attributes + $server_attribute_set [sa$client_validation];
      ELSEIF (keyword_value = 'CLIENT_ADDRESSES') THEN
        attributes := attributes + $server_attribute_set [sa$client_addresses];
      ELSEIF (keyword_value = 'CLIENT_INFO_SOURCE') THEN
        attributes := attributes + $server_attribute_set [sa$client_info_source];
      ELSE
        osp$set_status_abnormal (nac$status_id, nae$invalid_server_attribute, keyword_value, status);
        RETURN;
      IFEND;
      attributes_ptr := attributes_ptr^.link;
    WHILEND;
  PROCEND process_server_attrib_parameter;
?? OLDTITLE ??
?? NEWTITLE := 'process_tcpip_attrib_parameter', EJECT ??

  PROCEDURE process_tcpip_attrib_parameter
    (    pvt: clt$parameter_value;
     VAR attributes: tcpip_attribute_set;
     VAR status: ost$status);

    VAR
      keyword_value: clt$keyword,
      pvt_pointer: ^clt$data_value;


    attributes := $tcpip_attribute_set [];
    pvt_pointer := pvt.value;

    WHILE pvt_pointer <> NIL DO
      keyword_value := pvt_pointer^.element_value^.keyword_value;
      IF (keyword_value = 'ALL') THEN
        attributes := -$tcpip_attribute_set [];
      ELSEIF (keyword_value = 'PROTOCOL') THEN
        attributes := attributes + $tcpip_attribute_set [ta$protocol];
      ELSEIF (keyword_value = 'MAXIMUM_SOCKETS') THEN
        attributes := attributes + $tcpip_attribute_set [ta$maximum_sockets];
      ELSEIF (keyword_value = 'CAPABILITY') THEN
        attributes := attributes + $tcpip_attribute_set [ta$capability];
      ELSEIF (keyword_value = 'RING') THEN
        attributes := attributes + $tcpip_attribute_set [ta$ring];
      ELSEIF (keyword_value = 'SYSTEM_PRIVILEGE') THEN
        attributes := attributes + $tcpip_attribute_set [ta$system_privilege];
      ELSE
        osp$set_status_abnormal (nac$status_id, nae$invalid_tcpip_attribute, keyword_value, status);
        RETURN;
      IFEND;
      pvt_pointer := pvt_pointer^.link;
    WHILEND;

  PROCEND process_tcpip_attrib_parameter;
?? OLDTITLE ??
?? NEWTITLE := 'terminate_break_handler', EJECT ??

  PROCEDURE terminate_break_handler
    (    condition: pmt$condition;
         condition_descriptor: ^pmt$condition_information;
         save_area: ^ost$stack_frame_save_area;
     VAR status: ost$status);

{ PURPOSE: This routine processes the terminate break condition for MANNA.
{ DESIGN:  The global flag interrupt_detected is set to TRUE and the condition
{          is cancelled. Queued output is also discarded. It is the responsibility
{          of the procedure establishing this condition handler to periodically
{          check the interrupt_detected flag and terminate processing when it is set.

    interrupt_detected := TRUE;
    ifp$discard_suspended_output;

  PROCEND terminate_break_handler;
?? OLDTITLE ??
?? NEWTITLE := 'add_to_line', EJECT ??

  PROCEDURE [INLINE] add_to_line
    (    s: string ( * ));

    line.value (line.size + 1, * ) := s;
    IF (line.size + STRLENGTH (s)) <= max_line_width THEN
      line.size := line.size + STRLENGTH (s);
    ELSE
      line.size := max_line_width;
    IFEND;

  PROCEND add_to_line;
?? TITLE := 'add_boolean_to_line', EJECT ??

  PROCEDURE [INLINE] add_boolean_to_line
    (    b: boolean);

    IF b THEN
      add_to_line ('TRUE');
    ELSE
      add_to_line ('FALSE');
    IFEND;

  PROCEND add_boolean_to_line;
?? TITLE := 'add_integer_to_line', EJECT ??

  PROCEDURE [INLINE] add_integer_to_line
    (    i: integer);

    VAR
      ignore_status: ost$status,
      i_string: ost$string;

    clp$convert_integer_to_string (i, 10, FALSE, i_string, ignore_status);
    add_to_line (i_string.value (1, i_string.size));

  PROCEND add_integer_to_line;
?? TITLE := 'display_wide_line', EJECT ??

  PROCEDURE [INLINE] display_wide_line
    (    display_line: clt$command_line;
     VAR status: ost$status);

    VAR
      line_index: clt$command_line_index,
      line_size: clt$command_line_size,
      line_width: clt$command_line_size;

    line_index := 1;
    line_size := STRLENGTH (display_line);
    line_width := page_width - 1;

    WHILE line_size > line_width DO
      clp$put_display (current_display_control^, display_line (line_index, line_width), clc$trim, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      line_index := line_index + line_width;
      line_size := line_size - line_width;
    WHILEND;
    IF line_size > 0 THEN
      clp$put_display (current_display_control^, display_line (line_index, line_size), clc$trim, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;

  PROCEND display_wide_line;

?? TITLE := 'fits_on_current_line', EJECT ??

  FUNCTION [INLINE] fits_on_current_line
    (    string_size: ost$string_size;
         reserve_size: 0 .. continuation_indicator_size): boolean;

    fits_on_current_line := (line.size + string_size + reserve_size) <= page_width;
  FUNCEND fits_on_current_line;
?? TITLE := 'flush_line', EJECT ??

  PROCEDURE [INLINE] flush_line
    (VAR status: ost$status);

    clp$put_display (current_display_control^, line.value (1, line.size), clc$trim, status);
    line.size := 0;

  PROCEND flush_line;
?? TITLE := 'indent_line', EJECT ??

  PROCEDURE [INLINE] indent_line
    (    column: integer);

    IF column <= page_width THEN
      line.value (1, (column - 1)) := ' ';
      line.size := column - 1;
    IFEND;

  PROCEND indent_line;
?? TITLE := 'put_line', EJECT ??

  PROCEDURE [INLINE] put_line
    (VAR status: ost$status);

    VAR
      ignore_byte_address: amt$file_byte_address;

    amp$put_next (output_file_id, ^line.value, line.size, ignore_byte_address, status);
    line.size := 0;
    line.value := '';

  PROCEND put_line;
?? TITLE := 'tab_line', EJECT ??

  PROCEDURE [INLINE] tab_line
    (    column: integer);

    IF line.size < (column - 1) THEN
      line.value (line.size + 1, * ) := '';
      IF column <= max_line_width THEN
        line.size := column - 1;
      ELSE
        line.size := max_line_width;
      IFEND;
    IFEND;

  PROCEND tab_line;
MODEND nam$manage_network_applications;
