?? RIGHT := 110 ??
?? NEWTITLE := 'DISPLAY SCFS LOG' ??
MODULE nfm$display_scfs_log;

?? NEWTITLE := 'Global References', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc nat$protocol_stack_integer
*copyc nft$accept_messages
*copyc nft$all_or_top_10_q_entries
*copyc nft$banner_highlight_field
*copyc nft$banner_page_count
*copyc nft$btfs_di_advanced_features
*copyc nft$carriage_control_action
*copyc nft$change_bd_attr_resp_msg
*copyc nft$code_set
*copyc nft$connection_address
*copyc nft$copies
*copyc nft$destination_unavail_actions
*copyc nft$device_control_resp_codes
*copyc nft$device_file_size
*copyc nft$device_max_page_length
*copyc nft$device_status
*copyc nft$device_status_data
*copyc nft$device_type
*copyc nft$display_status_resp_codes
*copyc nft$external_characteristics
*copyc nft$file_and_priority
*copyc nft$file_assignment_response
*copyc nft$file_count
*copyc nft$file_disposition
*copyc nft$file_position
*copyc nft$file_size
*copyc nft$file_transfer_state
*copyc nft$file_transfer_status
*copyc nft$file_vertical_print_density
*copyc nft$format_effector_actions
*copyc nft$forms_code
*copyc nft$forms_size
*copyc nft$input_job_size
*copyc nft$io_station_usage
*copyc nft$message_kind
*copyc nft$network_address
*copyc nft$ntf_authority_level
*copyc nft$ntf_command_kind
*copyc nft$ntf_command_text
*copyc nft$ntf_inactivity_timer
*copyc nft$ntf_line_speed
*copyc nft$ntf_logical_line_number
*copyc nft$ntf_positive_acknowledge
*copyc nft$ntf_remote_system_data
*copyc nft$ntf_remote_system_kind
*copyc nft$ntf_remote_system_protocol
*copyc nft$ntf_remote_system_type
*copyc nft$ntf_route_back_position
*copyc nft$ntf_skip_punch_count
*copyc nft$ntf_wait_a_bit
*copyc nft$optimize_list
*copyc nft$output_data_mode
*copyc nft$page_format
*copyc nft$page_length
*copyc nft$page_width
*copyc nft$parameter_value_length
*copyc nft$pm_message_actions
*copyc nft$position_file_param_types
*copyc nft$priority
*copyc nft$priority_multiplier
*copyc nft$q_status_data
*copyc nft$select_file_response
*copyc nft$suppress_carriage_control
*copyc nft$terminal_model
*copyc nft$terqo_file_status_codes
*copyc nft$tip_type
*copyc nft$transmit_block_size
*copyc nft$unsolicited_device_msg
*copyc nft$vertical_print_density
*copyc nft$vfu_load_option
*copyc ost$date_time
*copyc osv$ebcdic_to_ascii
?? POP ??
*copyc amp$get_segment_pointer
*copyc amp$return
*copyc clp$build_standard_title
*copyc clp$close_display
*copyc clp$convert_integer_to_string
*copyc clp$convert_str_to_path_handle
*copyc clp$evaluate_parameters
*copyc clp$new_display_line
*copyc clp$open_display
*copyc clp$put_display
*copyc clp$put_partial_display
*copyc clp$reset_for_next_display_page
*copyc clp$trimmed_string_size
*copyc fsp$close_file
*copyc fsp$open_file
*copyc osp$translate_bytes
*copyc pmp$establish_condition_handler
*copyc pmp$format_compact_date
*copyc pmp$format_compact_time
?? TITLE := 'Global Definitions', EJECT ??

  CONST
    accept_msg_size = 3,
    all_or_top_10_size = 16,
    banner_highlight_size = 14,
    btfs_di_status_size = 14,
    cc_action_size = 19,
    chabda_param_size = 25,
    code_set_size = 12,
    data_mode_size = 11,
    dest_unavail_size = 17,
    device_status_size = 24,
    device_type_size = 23,
    display_value_size = 55,
    fe_action_size = 20,
    file_disposition_size = 8,
    file_transfer_state_size = 12,
    file_vpd_action_size = 6,
    label_size = 31,
    page_format_size = 13,
    pm_action_size = 7,
    posf_direction_size = 9,
    posf_start_pos_size = 17,
    posf_units_size = 4,
    station_usage_size = 7,
    terqo_file_status_size = 22,
    tip_types_size = 24,
    transfer_status_size = 33,
    vfu_size = 26,
    vpd_action_size = 28;

  TYPE
    nft$btfs_di_status_codes = (nfc$btfs_di_down, nfc$btfs_di_active),
    nft$connection_kind = (nfc$unknown_connection, nfc$scfdi_connection,
          nfc$scfve_connection, nfc$operator_connection,
          nfc$scfsve_connection, nfc$ntfve_connection, nfc$ntf_operator_connection);

  VAR
    all_or_top_10: [READ] array [nft$all_or_top_10_q_entries] of
          string (all_or_top_10_size) := [{nfc$all_q_entries} 'All Q Entries',
          {nfc$top_10_q_entries} 'Top 10 Q Entries'],

    authority_levels: [READ, STATIC] array [nft$ntf_authority_level] of string (display_value_size) :=
          [
          {nfc$ntf_none} 'NONE',
          {nfc$ntf_network} 'NET',
          {nfc$ntf_job} 'JOB'],

    btf_ve_protocol_stacks: [READ] array [nac$xns_protocol_stack .. nac$all_protocol_stacks] of
          string (7) := ['XNS', 'OSI', 'XNS+OSI'],

    btfs_di_advanced_features: [READ] array [nft$btfs_di_advanced_features] of
          string (23) := ['NONE', 'URI_TRANSPARENT_SUPPORT'],

    btfs_di_statuses: [READ] array [nft$btfs_di_status_codes] of
          string (btfs_di_status_size) := [{nfc$btfs_di_down} 'BTFS/DI Down',
          {nfc$btfs_di_active} 'BTFS/DI Active'],

    chabda_parameters: [READ] array [nft$change_bda_resp_parameters] of
          string (chabda_param_size) := [{nfc$null_parameter} 'ERROR',
          {nfc$io_station_name} 'ERROR',
          {nfc$device_name} 'DEVICE_NAME',
          {nfc$device_alias_1} 'DEVICE_ALIAS_1',
          {nfc$device_alias_2} 'DEVICE_ALIAS_2',
          {nfc$device_alias_3} 'DEVICE_ALIAS_3',
          {nfc$file_acknowledgement} 'FILE_ACKNOWLEDGEMENT',
          {nfc$terminal_model} 'TERMINAL_MODEL',
          {nfc$transmission_block_size} 'TRANSMISSION_BLOCK_SIZE',
          {nfc$maximum_file_size} 'MAXIMUM_FILE_SIZE',
          {nfc$page_width} 'PAGE_WIDTH',
          {nfc$page_length} 'PAGE_LENGTH',
          {nfc$banner_page_count} 'BANNER_PAGE_COUNT',
          {nfc$banner_highlight_field} 'BANNER_HIGHLIGHT_FIELD',
          {nfc$carriage_control_action} 'CARRIAGE_CONTROL_SUPPORT',
          {nfc$forms_code_1} 'FORMS_CODE_1',
          {nfc$forms_code_2} 'FORMS_CODE_2',
          {nfc$forms_code_3} 'FORMS_CODE_3',
          {nfc$forms_code_4} 'FORMS_CODE_4',
          {nfc$external_characteristics_1} 'EXTERNAL_CHARACTERISTICS_1',
          {nfc$external_characteristics_2} 'EXTERNAL_CHARACTERISTICS_2',
          {nfc$external_characteristics_3} 'EXTERNAL_CHARACTERISTICS_3',
          {nfc$external_characteristics_4} 'EXTERNAL_CHARACTERISTICS_4',
          {nfc$code_set} 'CODE_SET',
          {nfc$vertical_print_density} 'VERTICAL_PRINT_DENSITY',
          {nfc$vfu_load_procedure} 'VFU_LOAD_PROCEDURE',
          {nfc$forms_size} 'FORMS_SIZE',
          {nfc$undefined_fe_action} 'UNDEFINED_FE_ACTION',
          {nfc$unsupported_fe_action} 'UNSUPPORTED_FE_ACTION',
          {29 - 65} REP 37 of 'ERROR'],

    code_sets: [READ] array [nft$code_set] of string (code_set_size) :=
          [{nfc$ascii} 'ascii', {nfc$ascii_48}
          'ascii_48',
          {nfc$ascii_64} 'ascii_64', {nfc$ascii_95} 'ascii_95',
          {nfc$ascii_128} 'ascii_128', {nfc$ebcdic} 'ebcdic',
          {nfc$ascii_256} 'ascii_256', {nfc$bcd} 'bcd',
          {nfc$site_defined} 'site_defined'],

    command_kinds: [READ, STATIC] array [nft$ntf_command_kind] of ost$name := [
          {nfc$ntf_command} 'COMMAND',
          {nfc$ntf_message} 'MESSAGE',
          {nfc$ntf_signon} 'SIGNON',
          {nfc$ntf_signoff} 'SIGNOFF',
          {nfc$ntf_change_tdp} 'CHANGE_TDP',
          {nfc$ntf_operator_message} 'NTF_OPERATOR_MESSAGE',
          {nfc$ntf_user_message} 'NTF_USER_MESSAGE',
          {nfc$ntf_client_command} 'NTF_CLIENT_COMMAND'],

    destination_unavail_actions: [READ] array
          [nft$destination_unavail_actions] of string (dest_unavail_size) :=
          [{nfc$drop_input_job} 'drop input job',     {nfc$stop_input_device}
          'stop input device'],

    device_statuses: [READ] array [nft$device_status] of
          string (device_status_size) := [{nfc$device_active}
          'active', {nfc$device_stopped} 'stopped',
          {nfc$device_not_ready} 'not ready', {nfc$device_down} 'down',
          {nfc$device_loading_vfu} 'loading VFU',
          {nfc$default_vfu_not_loadable} 'default VFU not loadable',
          {nfc$default_stopped_by_system} 'stopped by system',
          {nfc$device_status_reserved_7} 'reserved_7',
          {nfc$device_status_reserved_8} 'reserved_8',
          {nfc$device_status_reserved_9} 'reserved_9',
          {nfc$device_status_reserved_10} 'reserved_10',
          {nfc$ntf_waiting_signon} 'NTF wait signon',
          {nfc$ntf_signon_initiated} 'NTF signon initiated',
          {nfc$ntf_signed_on} 'NTF signed on',
          {nfc$ntf_signon_failed} 'NTF signon failed',
          {nfc$ntf_signed_off} 'NTF signed off'],

    device_types: [READ] array [nft$device_type] of string
          (device_type_size) := [{nfc$null_device} ' ',
          {nfc$console} 'console',
          {nfc$reader} 'reader', {nfc$printer} 'printer',
          {nfc$punch} 'punch', {nfc$plotter} 'plotter',
          {nfc$ntf_remote_system_input} 'NTF remote system input',
          {nfc$ntf_job_receiver} 'NTF job receiver',
          {nfc$ntf_sysout_receiver} 'NTF sysout receiver',
          {nfc$ntf_job_transmitter} 'NTF job transmitter',
          {nfc$ntf_sysout_transmitter} 'NTF sysout transmitter'],

    file_dispositions: [READ] array [nft$file_disposition] of
          string (file_disposition_size) := [
          {nfc$requeue_file} 'requeue',
          {nfc$drop_file_from_q} 'drop',
          {nfc$hold_file_in_queue} 'hold',
          {nfc$complete_file} 'complete',
          {nfc$maintain_file_position} 'maintain'],

    file_transfer_statuses: [READ] array [nft$file_transfer_status] of
          string (transfer_status_size) := [{nfc$idle} 'idle',
          {nfc$idle_device_disconnect} 'idle, device disconnect',
          {nfc$idle_vfu_not_loadable} 'idle, vfu not loadable',
          {nfc$idle_transfer_error} 'idle, transfer error',
          {nfc$idle_accounting_limit} 'idle, accounting limit',
          {nfc$idle_operator_drop_file} 'idle, operator dropped file',
          {nfc$idle_operator_requeued_file} 'idle, operator requeued file',
          {nfc$idle_operator_hold_file} 'idle, operator hold file',
          {nfc$busy} 'busy',
          {nfc$suspended_device_not_ready} 'suspended, device not ready',
          {nfc$suspended_pm_message} 'suspended, PM message',
          {nfc$suspended_operator_command} 'suspended, operator command',
          {nfc$suspended_operator_posf_comd} 'suspended, operator position file',
          {nfc$suspended_vfu_being_loaded} 'suspended, VFU procedure being loaded',
          {nfc$busy_reserved_14} ' ',
          {nfc$busy_reserved_15} ' '],

    file_vpd_actions: [READ] array [nft$file_vertical_print_density] of
          string (file_vpd_action_size) := [{nfc$vertical_print_density_none}
          'none',
          {nfc$vertical_print_density_6} 'six',
          {nfc$vertical_print_density_7} 'seven',
          {nfc$vertical_print_density_8} 'eight',
          {nfc$vertical_print_density_9} 'nine',
          {nfc$vertical_print_density_10} 'ten',
          {nfc$vertical_print_density_11} 'eleven',
          {nfc$vertical_print_density_12} 'twelve'],

    format_effector_actions: [READ] array [nft$format_effector_actions] of
          string (fe_action_size) := [{nfc$print_after_spacing}
          'print_after_spacing', {nfc$print_before_spacing}
          'print_before_spacing',
          {nfc$discard_print_line} 'discard_print_line'],

    display_message: boolean,

    pm_message_actions: [READ] array [nft$pm_message_actions] of
          string (pm_action_size) := ['print', 'display', 'discard'],

    remote_system_kinds: [READ, STATIC] array [nft$ntf_remote_system_kind] of string
          (display_value_size) := ['NOT_CONFIGURED', 'DIRECTLY_CONNECTED', 'ACCESSIBLE'],

    remote_system_protocols: [READ, STATIC] array [nft$ntf_remote_system_protocol] of
            string (display_value_size) := ['NJE', 'HASP'],

    terqo_file_status_codes: [READ] array [nft$terqo_file_status_codes] of string (terqo_file_status_size) :=
          [{nfc$terqo_successful} 'terminate successful',
          {nfc$terqo_unknown_ios} 'unknown io station',
          {nfc$terqo_unknown_file_name} 'unknown file name',
          {nfc$terqo_duplicate_file_names} 'duplicate file name',
          {nfc$terqo_file_in_transfer} 'file being transferred',
          {nfc$terqo_message_rejected} 'message rejected'],

    remote_system_types: [READ, STATIC] array [nft$ntf_remote_system_type] of
          string (display_value_size) := [
          {nfc$ntf_nos_ve} 'NOS_VE',
          {nfc$ntf_nos} 'NOS',
          {nfc$ntf_nos_be} 'NOS_BE',
          {nfc$ntf_ibm} 'IBM',
          {nfc$ntf_dec} 'DEC',
          {nfc$ntf_user} 'USER',
          {nfc$ntf_cyber_205} 'CYBER_205',
          {nfc$ntf_eta} 'ETA',
          {nfc$ntf_cray} 'CRAY'],

    tip_types: [READ] array [nft$tip_type] of string (tip_types_size) :=
          [{nfc$internal_tip} 'internal_tip',
          {nfc$auto_tip} 'auto_tip',
          {nfc$async_tip} 'async_tip',
          {nfc$user1_tip} 'user1_tip',
          {nfc$user2_tip} 'user2_tip',
          {nfc$user3_tip} 'user3_tip',
          {nfc$user4_tip} 'user4_tip',
          {nfc$hasp_tip} 'hasp_tip',
          {nfc$x25_async_tip} 'x25_async_tip',
          {nfc$bisync_3270_tip} 'bisync_3270_tip',
          {nfc$bisync_njef_tip} 'bisync_njef_tip',
          {nfc$remote_term_emulator_tip} 'remote_term_emulator_tip',
          {nfc$uri_tip} 'uri_tip',
          {nfc$xpc_tip} 'xpc_tip',
          {nfc$mode4_tip} 'mode4_tip',
          {nfc$ntf_tip} 'ntf_tip',
          {nfc$sna_3270_tip} 'sna_3270_tip',
          {nfc$telnet_tip} 'telnet_tip'],

    vfu_load_option_actions: [READ] array [nft$vfu_load_option] of
          string (vfu_size) := [{nfc$vfu_not_present_or_load}
          'vfu not present or load',
          {nfc$vfu_loaded_at_init} 'vfu loaded at init',
          {nfc$vfu_changeable_by_operator} 'vfu changeable by operator',
          {nfc$vfu_changeable_by_user} 'vfu changeable by user'],

    vpd_actions: [READ] array [nft$vertical_print_density] of
          string (vpd_action_size) := [{nfc$six_only} 'six_only',
          {nfc$eight_only} 'eight_only',
          {nfc$six_any} 'six_any',                     {nfc$eight_any}
          'eight_any'],

    carriage_control_actions: [READ] array [nft$carriage_control_action] of
          string (cc_action_size) := [{nfc$pre_print} 'pre-print',
          {nfc$post_print} 'post-print',
          {nfc$pre_and_post_print} 'pre- and post-print'],

    banner_highlight_fields: [READ] array [nft$banner_highlight_field] of
          string (banner_highlight_size) := [{nfc$comment_banner}
          'comment_banner', {nfc$routing_banner} 'routing_banner',
          {nfc$site_banner} 'site_banner', {nfc$user_file_name}
          'user_file_name',
          {nfc$user_name} 'user_name'],

    station_usages: [READ] array [nft$io_station_usage] of
          string (station_usage_size) := [{nfc$public_io_station} 'public',
          {nfc$private_io_station} 'private', 'NTF'],

    accept_msg: [READ] array [nft$accept_messages] of
          string (accept_msg_size) := ['yes', 'no'],

    output_data_modes: [READ] array [nft$output_data_mode] of
          string (data_mode_size) := [{nfc$coded_mode}
          'coded', {nfc$transparent_mode} 'transparent'],

    file_transfer_states: [READ] array [nft$file_transfer_state] of
          string (file_transfer_state_size) := [{nfc$eligible_for_output}
          'eligible', {nfc$hold_output} 'hold',
          {nfc$not_eligible_for_output} 'not eligible',
          {nfc$selected_for_output} 'selected'],

    page_formats: [READ] array [nft$page_format] of string
          (page_format_size) := [{amc$continuous_form}
          'continuous', {amc$burstable_form} 'burstable',
          {amc$non_burstable_form} 'non-burstable', {amc$untitled_form}
          'untitled'],

    posf_directions: [READ] array [nft$position_file_direction] of
          string (posf_direction_size) := [{nfc$position_file_backwards}
          'backwards', {nfc$position_file_forwards} 'forwards'],

    posf_start_positions: [READ] array [nft$position_file_from_position] of
          string (posf_start_pos_size) := [{nfc$end_of_file} 'end of file',
          {nfc$beginning_of_file} 'beginning of file',
          {nfc$last_line_printed} 'last line printed'],

    posf_units: [READ] array [nft$position_file_units] of
          string (posf_units_size) := [{nfc$position_file_page} 'page',
          {nfc$position_file_line} 'line'],

    boolean_values: [READ] array [boolean] of string (3) := [{false} 'no',
          {true} 'yes'];

{ PROCEDURE display_scfs_log (
{   log_file, lf: file = $required
{   output, o: file = $output
{   display_option, do: key
{       (brief, b)
{       (full, f)
{     keyend = full
{   format, f: (BY_NAME, ADVANCED) key
{       r131, r141, r152
{     keyend = r152
{   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,
        default_value: string (7),
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 4] of clt$keyword_specification,
        default_value: string (4),
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 3] of clt$keyword_specification,
        default_value: string (4),
      recend,
      type5: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [90, 5, 1, 11, 16, 56, 319],
    clc$command, 9, 5, 1, 1, 0, 0, 5, ''], [
    ['DISPLAY_OPTION                 ',clc$nominal_entry, 3],
    ['DO                             ',clc$abbreviation_entry, 3],
    ['F                              ',clc$abbreviation_entry, 4],
    ['FORMAT                         ',clc$nominal_entry, 4],
    ['LF                             ',clc$abbreviation_entry, 1],
    ['LOG_FILE                       ',clc$nominal_entry, 1],
    ['O                              ',clc$abbreviation_entry, 2],
    ['OUTPUT                         ',clc$nominal_entry, 2],
    ['STATUS                         ',clc$nominal_entry, 5]],
    [
{ 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, 3, clc$required_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, 3, clc$optional_default_parameter, 0, 7],
{ 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, 155, clc$optional_default_parameter, 0, 4],
{ PARAMETER 4
    [4, clc$advanced_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 118, clc$optional_default_parameter, 0, 4],
{ PARAMETER 5
    [9, 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$file_type],
    '$output'],
{ PARAMETER 3
    [[1, 0, clc$keyword_type], [4], [
    ['B                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 1],
    ['BRIEF                          ', clc$nominal_entry,
  clc$normal_usage_entry, 1],
    ['F                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
    ['FULL                           ', clc$nominal_entry,
  clc$normal_usage_entry, 2]]
    ,
    'full'],
{ PARAMETER 4
    [[1, 0, clc$keyword_type], [3], [
    ['R131                           ', clc$nominal_entry,
  clc$normal_usage_entry, 1],
    ['R141                           ', clc$nominal_entry,
  clc$normal_usage_entry, 2],
    ['R152                           ', clc$nominal_entry,
  clc$normal_usage_entry, 3]]
    ,
    'r152'],
{ PARAMETER 5
    [[1, 0, clc$status_type]]];

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

    CONST
      p$log_file = 1,
      p$output = 2,
      p$display_option = 3,
      p$format = 4,
      p$status = 5;

    VAR
      pvt: array [1 .. 5] of clt$parameter_value;
?? TITLE := '  display BTFS/DI address', EJECT ??

  PROCEDURE display_btfs_di_address
    (    address: ^nft$network_address;
     VAR display_control: clt$display_control;
     VAR log_file_seq: amt$segment_pointer;
     VAR status: ost$status);

    CONST
      label = '    BTFS DI Network Address';

    VAR
      addr_index: integer,
      address_str: ost$string,
      str: ost$string;


    clp$convert_integer_to_string (address^.network, 16, FALSE, str, status);
    address_str.value := str.value (1, str.size);
    addr_index := 1 + str.size;

    clp$convert_integer_to_string (address^.system, 16, FALSE, str, status);
    address_str.value (addr_index, str.size) := str.value (1, str.size);
    addr_index := addr_index + str.size;

    put_display_line (address_str.value (1, addr_index - 1), label,
          display_control, status);

  PROCEND display_btfs_di_address;
?? TITLE := 'display connection address', EJECT ??

  PROCEDURE display_connection_address
    (    label: string (*);
         address: ^nft$connection_address;
     VAR display_control: clt$display_control;
     VAR status: ost$status);

    VAR
      addr_index: integer,
      address_str: ost$string,
      byte_index: integer,
      byte_ptr: ^0 .. 0ff(16),
      length: integer,
      osi_network_address: ^SEQ ( * ),
      str: ost$string;

    IF address^.kind = nac$internet_address THEN
      address_str.value := 'Addr (XNS): ';
      addr_index := 1 + 12;

      clp$convert_integer_to_string (address^.internet_address.network, 16,
            FALSE, str, status);
      address_str.value (addr_index, str.size) := str.value (1, str.size);
      addr_index := addr_index + str.size;

      clp$convert_integer_to_string (address^.internet_address.system, 16,
            FALSE, str, status);
      address_str.value (addr_index, str.size) := str.value (1, str.size);
      addr_index := addr_index + str.size;
    ELSE
      address_str.value := 'Addr: ';
      addr_index := 1 + 6;

      osi_network_address := ^address^.network_address;
      RESET osi_network_address;
      FOR byte_index := 1 TO address^.network_address_length DO
        NEXT byte_ptr IN osi_network_address;
        STRINGREP (str.value, length, (byte_ptr^+100(16)):4:#(16));
        address_str.value (addr_index, 2) := str.value (3, 2);
        addr_index := addr_index + 2;
      FOREND;
    IFEND;

    put_display_line (address_str.value (1, addr_index - 1), label,
          display_control, status);

  PROCEND display_connection_address;
?? TITLE := '  display connection message', EJECT ??

  PROCEDURE display_connection_message
    (VAR display_control: clt$display_control;
     VAR log_file_seq: amt$segment_pointer;
     VAR status: ost$status);

    VAR
      message_kind_str: [STATIC] array [nft$message_kind] of string (42) :=
            [' ',
            { 1} '  Add File Availablity', { 2} '  Modify File Availablity',
            { 3} '  Delete File Availablity', { 4} '  File Assignment',
            { 5} '  File Assignment Response', { 6} '  Delete Destination',
            { 7} '  BTF/VE Status', { 8} ' ',
            { 9} '  Add Accessible Remote System Response', {10} '  Get Remote System Names',
            {11} '  Remote System Names Data', {12} '  Get Remote System Options',
            {13} '  Remote System Options Data', {14} '  Delete NTF User',
            {15} '  Delete NTF User Response',
            {16} '  Send Remote Command', {17} '  Send Remote Command Response',
            {18} '  Get Remote System Status', {19} '  Get Remote System Status Data',
            {20} '  Add I/O Station', {21} '  Delete I/O Station',
            {22} '  Add Batch Device', {23} '  Batch Device Status',
            {24} '  File Transfer Status', {25} '  Delete Batch Device',
            {26} '  BTFS/DI Status', {27} '  Add I/O Station Response',
            {28} '  Delete I/O Station Response', {29} '  Start I/O Station',
            {30} '  Stop I/O Station', {31} '  Switch Control Facility',
            {32} '  Position File', {33} '  Add Batch Device Response',
            {34} '  Delete Batch Device Response', {35} '  Add Remote System',
            {36} '  Add Accessible Remote System', {37} '  Delete Remote System',
            {38} '  Add Remote System Response', {39} '  Delete Remote System Response',
            {40} '  Suppress Carriage Control Response', {41} '  Start Batch Device',
            {42} '  Stop Batch Device', {43} '  Suppress Carriage Control',
            {44} '  Terminate Transfer', {45} '  Change Batch Device Attributes',
            {46} '  Change Batch Device Attributes Response', {47} '  Start Batch Device Response',
            {48} '  Stop Batch Device Response', {49} '  Terminate Transfer Response',
            {50} '  Position File Response', {51} '  Operator Msg',
            {52 - 59} REP 8 of ' ',
            {60} '  Add User', {61} '  Add User Response',
            {62} '  Select File', {63} '  Select File Response',
            {64} '  Position File', {65} '  Get Station Status',
            {66} '  Station Status Data', {67} '  Get Device Status',
            {68} '  Device Status Data', {69} '  Get Queue Status',
            {70} '  Queue Status Data', {71} '  Get Queue Entry List',
            {72} '  Queue Entry List Data', {73} '  Get Queue Entry',
            {74} '  Queue Entry Data', {75} '  Terminate Queued Output',
            {76} '  Terminate Queued Output Resp', {77 - 95} REP 19 of * ];

?? NEWTITLE := '    add batch device msg', EJECT ??

    PROCEDURE add_batch_device_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$add_batch_device_message

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        banner_page_count: ^nft$banner_page_count,
        banner_highlight_field: ^nft$banner_highlight_field,
        carriage_control_action: ^nft$carriage_control_action,
        code_set: ^nft$code_set,
        device_type: ^nft$device_type,
        device_status: ^nft$device_status,
        file_ack: ^boolean,
        file_transfer_status: ^nft$file_transfer_status,
        forms_size: ^nft$forms_size,
        maximum_file_size: ^nft$device_file_size,
        maximum_page_length: ^nft$device_max_page_length,
        msg_length: integer,
        page_width: ^nft$page_width,
        page_length: ^nft$page_length,
        parameter: ^nft$add_bd_message_parameter,
        str: ost$string,
        suppress_carriage_control: ^nft$suppress_carriage_control,
        tip_type: ^nft$tip_type,
        transmission_block_size: ^nft$transmit_block_size,
        undefined_fe_action: ^nft$format_effector_actions,
        unsupported_fe_action: ^nft$format_effector_actions,
        value_length: integer,
        vfu_load_option: ^nft$vfu_load_option,
        vertical_print_density: ^nft$vertical_print_density;

      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$device_status =
          NEXT device_status IN log_file_seq.sequence_pointer;
          put_display_line (device_statuses [device_status^],
                '    Device Status', display_control, status);

        = nfc$file_transfer_status_param =
          NEXT file_transfer_status IN log_file_seq.sequence_pointer;
          put_display_line (file_transfer_statuses [file_transfer_status^],
                '    File Transfer Status', display_control, status);

        = nfc$device_alias_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 1',
                display_control, status);

        = nfc$device_alias_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 2',
                display_control, status);

        = nfc$device_alias_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 3',
                display_control, status);

        = nfc$device_type =
          NEXT device_type IN log_file_seq.sequence_pointer;
          put_display_line (device_types [device_type^], '    Device Type',
                display_control, status);

        = nfc$tip_type =
          NEXT tip_type IN log_file_seq.sequence_pointer;
          put_display_line (tip_types [tip_type^], '    Tip Type',
                display_control, status);

        = nfc$terminal_model =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Terminal Model',
                display_control, status);

        = nfc$file_acknowledgement =
          NEXT file_ack IN log_file_seq.sequence_pointer;
          put_display_line (boolean_values [file_ack^],
                '    File Acknowledgement', display_control, status);

        = nfc$transmission_block_size =
          NEXT transmission_block_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (transmission_block_size^, 10, FALSE,
                str, status);
          put_display_line (str.value (1, str.size),
                '    Transmission Block Size', display_control, status);

        = nfc$maximum_file_size =
          NEXT maximum_file_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (maximum_file_size^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Maximum File Size',
                display_control, status);

        = nfc$page_width =
          NEXT page_width IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (page_width^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Page Width',
                display_control, status);

        = nfc$page_length =
          NEXT page_length IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (page_length^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Page Length',
                display_control, status);

        = nfc$banner_page_count =
          NEXT banner_page_count IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (banner_page_count^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Banner Page Count',
                display_control, status);

        = nfc$banner_highlight_field =
          NEXT banner_highlight_field IN log_file_seq.sequence_pointer;
          put_display_line (banner_highlight_fields [banner_highlight_field^],
                '    Banner_Highlight_Field', display_control, status);

        = nfc$carriage_control_action =
          NEXT carriage_control_action IN log_file_seq.sequence_pointer;
          put_display_line (carriage_control_actions
                [carriage_control_action^], '    Carriage Control Action',
                display_control, status);

        = nfc$forms_code_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 1', display_control,
                status);

        = nfc$forms_code_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 2', display_control,
                status);

        = nfc$forms_code_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 3', display_control,
                status);

        = nfc$forms_code_4 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 4', display_control,
                status);

        = nfc$external_characteristics_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 1',
                display_control, status);

        = nfc$external_characteristics_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 2',
                display_control, status);

        = nfc$external_characteristics_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 3',
                display_control, status);

        = nfc$external_characteristics_4 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 4',
                display_control, status);

        = nfc$suppress_carriage_control =
          NEXT suppress_carriage_control IN log_file_seq.sequence_pointer;
          put_display_line (boolean_values [suppress_carriage_control^],
                '    Suppress Carriage Control', display_control, status);

        = nfc$code_set =
          NEXT code_set IN log_file_seq.sequence_pointer;
          put_display_line (code_sets [code_set^], '    Code_Set',
                display_control, status);

        = nfc$vertical_print_density =
          NEXT vertical_print_density IN log_file_seq.sequence_pointer;
          put_display_line (vpd_actions [vertical_print_density^],
                '    Vertical_Print_Density', display_control, status);

        = nfc$vfu_load_procedure =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    VFU Load Image',
                display_control, status);

        = nfc$forms_size =
          NEXT forms_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (forms_size^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Forms Size',
                display_control, status);

        = nfc$undefined_fe_action =
          NEXT undefined_fe_action IN log_file_seq.sequence_pointer;
          put_display_line (format_effector_actions [undefined_fe_action^],
                '    Un_Defined_FE_Action', display_control, status);

        = nfc$unsupported_fe_action =
          NEXT unsupported_fe_action IN log_file_seq.sequence_pointer;
          put_display_line (format_effector_actions [unsupported_fe_action^],
                '    Un_Supported_FE_Action', display_control, status);

        = nfc$vfu_load_option =
          NEXT vfu_load_option IN log_file_seq.sequence_pointer;
          put_display_line (vfu_load_option_actions [vfu_load_option^],
                '    Vertical_Forms_Unit', display_control, status);

        = nfc$device_maximum_page_length =
          NEXT maximum_page_length IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (maximum_page_length^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Max Page Length',
                display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND add_batch_device_msg;
?? TITLE := '    add batch device response msg', EJECT ??

    PROCEDURE add_batch_device_resp_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$add_del_device_response
*copy nft$add_bd_resp_codes

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$add_del_bd_resp_parameter,
        response: string (40),
        response_code: ^nft$add_bd_responses,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$message_accepted =
            response := 'Message Accepted';
          = nfc$no_io_station_found =
            response := 'Message Rejected, no io station';
          = nfc$duplicate_device_name =
            response := 'Message Rejected, duplicate device';
          = nfc$duplicate_aliases_specified =
            response := 'Message Rejected, duplicate aliases';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND add_batch_device_resp_msg;
?? TITLE := '    add io station msg', EJECT ??

    PROCEDURE add_io_station_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$add_io_station_message
*copy nft$add_ios_resp_codes

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        destination_unavail_action: ^nft$destination_unavail_actions,
        file_ack: ^boolean,
        msg_length: integer,
        parameter: ^nft$add_ios_message_parameter,
        pm_message_action: ^nft$pm_message_actions,
        io_station_usage: ^nft$io_station_usage,
        str: ost$string,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$io_station_alias_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station Alias 1',
                display_control, status);

        = nfc$io_station_alias_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station Alias 2',
                display_control, status);

        = nfc$io_station_alias_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station Alias 3',
                display_control, status);

        = nfc$required_operator_device =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Required Operator Device',
                display_control, status);

        = nfc$station_usage =
          NEXT io_station_usage IN log_file_seq.sequence_pointer;
          put_display_line (station_usages [io_station_usage^],
                '    Station_Usage', display_control, status);

        = nfc$file_acknowledgement =
          NEXT file_ack IN log_file_seq.sequence_pointer;
          put_display_line (boolean_values [file_ack^],
                '    File Acknowledgement', display_control, status);

        = nfc$check_station_unique =
          NEXT file_ack IN log_file_seq.sequence_pointer;
          put_display_line (boolean_values [file_ack^], '    Check IOS Unique',
                display_control, status);

        = nfc$auto_operator_control =
          NEXT file_ack IN log_file_seq.sequence_pointer;
          put_display_line (boolean_values [file_ack^],
                '    Auto Operator Control', display_control, status);

        = nfc$default_job_destination =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Default Job Destination',
                display_control, status);

        = nfc$destination_unavail_action =
          NEXT destination_unavail_action IN log_file_seq.sequence_pointer;
          put_display_line (destination_unavail_actions
                [destination_unavail_action^],
                '    Destination_Unavailable_Action', display_control, status);
        = nfc$pm_message_action =
          NEXT pm_message_action IN log_file_seq.sequence_pointer;
          put_display_line (pm_message_actions [pm_message_action^],
                '    PM Message Action', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND add_io_station_msg;
?? TITLE := '    add io station response msg', EJECT ??

    PROCEDURE add_io_station_resp_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$add_io_station_response
*copy nft$add_ios_resp_codes

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$add_ios_resp_msg_parameter,
        response: string (53),
        response_code: ^nft$add_io_station_responses,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$message_accepted =
            response := 'Message Accepted';
          = nfc$duplicate_with_check_unique =
            response := 'Message Rejected, duplicate definition not allowed';
          = nfc$duplicate_defs_do_not_match =
            response := 'Message Rejected, duplicate definition does not match'
                  ;
          = nfc$duplicate_alias_names =
            response := 'Message Rejected, duplicate aliases';
          = nfc$not_unique_network_title =
            response := 'Message Rejected, duplicate title';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND add_io_station_resp_msg;
?? TITLE := '    add accessible remote sys msg', EJECT ??

    PROCEDURE add_accessible_remote_sys_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$ntf_add_acc_rem_sys_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        authority_level: ^nft$ntf_authority_level,
        line_number: ^nft$ntf_logical_line_number,
        parameter: ^nft$ntf_add_acc_rem_sys_msg,
        remote_system_type: ^nft$ntf_remote_system_type,
        route_back_position: ^nft$ntf_route_back_position,
        str: ost$string,
        value_length: integer;

      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$ntf_remote_system_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Remote System', display_control,
                status);

        = nfc$ntf_logical_line_number =
          NEXT line_number IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (line_number^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Logical Line Number',
                display_control, status);

        = nfc$ntf_acc_remote_system_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Acc Remote System', display_control,
                status);

        = nfc$ntf_authority_level =
          NEXT authority_level IN log_file_seq.sequence_pointer;
          put_display_line (authority_levels [authority_level^], '    Authority Level',
                display_control, status);

        = nfc$ntf_remote_system_type =
          NEXT remote_system_type IN log_file_seq.sequence_pointer;
          put_display_line (remote_system_types [remote_system_type^], '    Remote System Type',
                display_control, status);

        = nfc$ntf_route_back_position =
          NEXT route_back_position IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (route_back_position^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size),
                '    Route Back Position', display_control, status);
        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND add_accessible_remote_sys_msg;
?? TITLE := '    add acc remote system response msg', EJECT ??

    PROCEDURE add_acc_remote_system_resp_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$ntf_add_acc_rem_sys_resp
*copy nft$ntf_add_ars_response_codes

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        line_number: ^nft$ntf_logical_line_number,
        msg_length: integer,
        parameter: ^nft$ntf_add_acc_rem_sys_resp,
        response: string (53),
        response_code: ^nft$ntf_add_ars_response_codes,
        str: ost$string,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$ntf_remote_system_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Remote System', display_control,
                status);

        = nfc$ntf_logical_line_number =
          NEXT line_number IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (line_number^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Logical Line Number',
                display_control, status);

        = nfc$ntf_acc_remote_system_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Acc Remote System', display_control,
                status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$message_accepted =
            response := 'Message Accepted';
          = nfc$ntf_remote_system_not_found =
            response := 'Message Rejected, remote system not found';
          = nfc$ntf_logical_line_not_found =
            response := 'Message Rejected, logical line number not found';
          = nfc$ntf_dup_defs_do_not_match =
            response := 'Message Rejected, duplicate definition does not match';
          = nfc$ntf_remote_sys_not_listed =
            response := 'Message Rejected, remote system not found in NTF System List';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND add_acc_remote_system_resp_msg;
?? TITLE := '    add remote system msg', EJECT ??

    PROCEDURE add_remote_system_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$ntf_add_remote_sys_msg

      VAR
        a_level: ^nft$ntf_authority_level,
        ascii_string: ^string ( * <= osc$max_name_size),
        inactivity_timer: ^nft$ntf_inactivity_timer,
        line_number: ^nft$ntf_logical_line_number,
        line_speed: ^nft$ntf_line_speed,
        msg_length: integer,
        parameter: ^nft$ntf_add_remote_sys_msg,
        positive_acknowledge: ^nft$ntf_positive_acknowledge,
        protocol: ^nft$ntf_remote_system_protocol,
        remote_sys_type: ^nft$ntf_remote_system_type,
        request_perm_retry: ^boolean,
        route_back: ^nft$ntf_route_back_position,
        wait_a_bit: ^nft$ntf_wait_a_bit,
        str: ost$string,
        value_length: integer;

      VAR
      positive_acknowledges: [READ, STATIC] array [nft$ntf_positive_acknowledge] of
            string (display_value_size) := ['ACK', 'NULL'],
      wait_a_bits: [READ, STATIC] array [nft$ntf_wait_a_bit] of string (display_value_size) := ['ACK',
            'FCS'];

      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$ntf_remote_system_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Remote System', display_control,
                status);

        = nfc$ntf_protocol =
          NEXT protocol IN log_file_seq.sequence_pointer;
          put_display_line (remote_system_protocols [protocol^], '    Remote System Protocol',
                display_control, status);

        = nfc$ntf_logical_line_number =
          NEXT line_number IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (line_number^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Logical Line Number',
                display_control, status);

        = nfc$ntf_line_speed =
          NEXT line_speed IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (line_speed^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Line Speed',
                display_control, status);

        = nfc$ntf_line_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Line Name', display_control,
                status);

        = nfc$ntf_authority_level =
          NEXT a_level IN log_file_seq.sequence_pointer;
          put_display_line (authority_levels [a_level^], '    Authority Level',
                display_control, status);

        = nfc$ntf_terminal_user_procedure =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Terminal User Proc', display_control,
                status);

        = nfc$ntf_wait_a_bit =
          NEXT wait_a_bit IN log_file_seq.sequence_pointer;
          put_display_line (wait_a_bits [wait_a_bit^], '    Wait-A-Bit',
                display_control, status);

        = nfc$ntf_inactivity_timer =
          NEXT inactivity_timer IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (inactivity_timer^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Inactivity timer',
                display_control, status);

        = nfc$ntf_positive_acknowledge =
          NEXT positive_acknowledge IN log_file_seq.sequence_pointer;
          put_display_line (positive_acknowledges [positive_acknowledge^], '    Positive Acknowledgement',
                display_control, status);

        = nfc$ntf_default_job_destination =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Default Job Destination', display_control,
                status);

        = nfc$ntf_default_file_destin =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Default File Destination', display_control,
                status);

        = nfc$ntf_store_forward_destin =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Store-and-Forward Destination', display_control,
                status);

        = nfc$ntf_remote_system_type =
          NEXT remote_sys_type IN log_file_seq.sequence_pointer;
          put_display_line (remote_system_types [remote_sys_type^], '    Remote System Type',
                display_control, status);

        = nfc$ntf_route_back_position =
          NEXT route_back IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (route_back^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size),
                '    Route Back Position', display_control, status);

        = nfc$ntf_request_perm_retry =
          NEXT request_perm_retry IN log_file_seq.sequence_pointer;
          IF request_perm_retry^ THEN
            str.value := 'True';
          ELSE
            str.value := 'False';
          IFEND;
          put_display_line (str.value (1,5), '    Request Permission Retry',
                display_control, status);

        = nfc$ntf_local_system_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Local System Name', display_control,
                status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND add_remote_system_msg;
?? TITLE := '    ntf msg', EJECT ??

    PROCEDURE ntf_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

      NEXT byte_array: [1 .. message_length-1] IN log_file_seq.sequence_pointer;

      put_display_line ('-- Not currently displayed --', '    NTF Parameters',  display_control,
            status);

    PROCEND ntf_msg;
?? TITLE := '    add remote system response msg', EJECT ??

    PROCEDURE add_remote_system_resp_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$ntf_add_remote_sys_resp
*copy nft$ntf_add_rs_response_codes

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        line_number: ^nft$ntf_logical_line_number,
        msg_length: integer,
        parameter: ^nft$ntf_add_remote_sys_resp,
        response: string (53),
        response_code: ^nft$ntf_add_rs_response_codes,
        str: ost$string,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$ntf_remote_system_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Remote System', display_control,
                status);

        = nfc$ntf_logical_line_number =
          NEXT line_number IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (line_number^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Logical Line Number',
                display_control, status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$message_accepted =
            response := 'Message Accepted';
          = nfc$ntf_dup_defs_do_not_match =
            response := 'Message Rejected, duplicate definition does not match';
          = nfc$ntf_dup_logical_line_number =
            response := 'Message Rejected, duplicate logical line number';
          = nfc$ntf_dup_rs_name_in_domain =
            response := 'Message Rejected, duplicate title';
          = nfc$ntf_remote_sys_not_listed =
            response := 'Message Rejected, remote system not found in NTF System List';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND add_remote_system_resp_msg;
?? TITLE := '    add user msg', EJECT ??

    PROCEDURE add_user_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$add_user_msg

      VAR
        accept_messages: ^nft$accept_messages,
        ascii_string: ^string ( * <= osc$max_name_size),
        io_station_usage: ^nft$io_station_usage,
        msg_length: integer,
        parameter: ^nft$add_user_message_parameter,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$station_or_control_facility =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$control_device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Control Device',
                display_control, status);

        = nfc$family_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Family', display_control,
                status);

        = nfc$user_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    User', display_control,
                status);

        = nfc$station_usage =
          NEXT io_station_usage IN log_file_seq.sequence_pointer;
          put_display_line (station_usages [io_station_usage^],
                '    I/O Station Usage', display_control, status);

        = nfc$accept_messages =
          NEXT accept_messages IN log_file_seq.sequence_pointer;
          put_display_line (accept_msg [accept_messages^],
                '    Accept Messages', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND add_user_msg;
?? TITLE := '    add user response msg', EJECT ??

    PROCEDURE add_user_resp_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$add_user_resp_msg
*copyc nft$add_user_responses

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$add_user_resp_msg_parameter,
        response: string (43),
        response_code: ^nft$add_user_responses,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$station_or_control_facility =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$message_accepted =
            response := 'Message Accepted';
          = nfc$no_io_station_found =
            IF connection_kind^ = nfc$ntf_operator_connection THEN
              response := 'Message Accepted';
            ELSE
              response := 'Message Rejected, no io station';
            IFEND;

          = nfc$operator_already_assigned =
            response := 'Message Rejected, Operator already assigned';
          = nfc$operator_device_mismatch =
            response := 'Message Rejected, Operator device mismatch';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND add_user_resp_msg;
?? TITLE := '    batch device status msg', EJECT ??

    PROCEDURE batch_device_status_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$batch_device_status_message

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        device_status: ^nft$device_status,
        file_transfer_status: ^nft$file_transfer_status,
        msg_length: integer,
        parameter: ^nft$bd_status_message_parameter,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$device_status =
          NEXT device_status IN log_file_seq.sequence_pointer;
          put_display_line (device_statuses [device_status^],
                '    Device Status', display_control, status);

        = nfc$file_transfer_status_param =
          NEXT file_transfer_status IN log_file_seq.sequence_pointer;
          put_display_line (file_transfer_statuses [file_transfer_status^],
                '    File Transfer Status', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND batch_device_status_msg;
?? TITLE := '    btf ve status msg', EJECT ??

  PROCEDURE btf_ve_status_msg
    (    message_length: integer;
     VAR display_control: clt$display_control;
     VAR log_file_seq: amt$segment_pointer;
     VAR status: ost$status);

*copy nft$btf_ve_status_message

    VAR
      ascii_string: ^string ( * <= osc$max_name_size),
      btf_ve_protocol_stack: ^nat$protocol_stack_integer,
      msg_length: integer,
      parameter: ^nft$btf_ve_status_parameter,
      value_length: integer;

    msg_length := message_length - 1;
    NEXT parameter IN log_file_seq.sequence_pointer;

    WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
          (msg_length > 0) DO
      msg_length := msg_length - 1;
      IF parameter^.length_indicated THEN
        get_parameter_value_length (log_file_seq, msg_length, value_length,
              status);
        msg_length := msg_length - value_length;
      ELSE
        value_length := 1;
        msg_length := msg_length - 1;
      IFEND;

      IF parameter^.param = nfc$btf_ve_protocol_stacks THEN
        NEXT btf_ve_protocol_stack IN log_file_seq.sequence_pointer;
        put_display_line (btf_ve_protocol_stacks [btf_ve_protocol_stack^],
              '    BTF/VE Protocol Stacks', display_control, status);
      ELSE
{ ERROR
      IFEND;
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;
      IF msg_length > 0 THEN
        NEXT parameter IN log_file_seq.sequence_pointer;
      IFEND;
    WHILEND;

  PROCEND btf_ve_status_msg;
?? TITLE := '    btfs di status msg', EJECT ??

    PROCEDURE btfs_di_status_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$btfs_di_status_message

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        btfs_di_advanced_feature: ^nft$btfs_di_advanced_features,
        btfs_di_network_address: ^nft$network_address,
        btfs_di_status_code: ^nft$btfs_di_status_codes,
        msg_length: integer,
        parameter: ^nft$btfs_di_status_parameter,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$btfs_di_network_address =
          NEXT btfs_di_network_address IN log_file_seq.sequence_pointer;
          display_btfs_di_address (btfs_di_network_address, display_control,
                log_file_seq, status);

        = nfc$btfs_status_code =
          NEXT btfs_di_status_code IN log_file_seq.sequence_pointer;
          put_display_line (btfs_di_statuses [btfs_di_status_code^],
                '    BTFS/DI Status', display_control, status);

        = nfc$btfs_di_title =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    BTFS/DI Title',
                display_control, status);

        = nfc$btfs_di_advanced_features =
          NEXT btfs_di_advanced_feature IN log_file_seq.sequence_pointer;
          put_display_line (btfs_di_advanced_features [btfs_di_advanced_feature^],
                '    BTFS/DI Advanced Features', display_control, status);

        ELSE

          {       ERROR

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND btfs_di_status_msg;
?? TITLE := '    change batch device attributes', EJECT ??

    PROCEDURE change_batch_device_attributes
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$change_bd_attributes_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        banner_page_count: ^nft$banner_page_count,
        banner_highlight_field: ^nft$banner_highlight_field,
        carriage_control_action: ^nft$carriage_control_action,
        code_set: ^nft$code_set,
        file_ack: ^boolean,
        forms_size: ^nft$forms_size,
        msg_length: integer,
        maximum_file_size: ^nft$device_file_size,
        page_length: ^nft$page_length,
        page_width: ^nft$page_width,
        parameter: ^nft$change_bd_attr_parameter,
        str: ost$string,
        transmission_block_size: ^nft$transmit_block_size,
        undefined_fe_action: ^nft$format_effector_actions,
        unsupported_fe_action: ^nft$format_effector_actions,
        value_length: integer,
        vertical_print_density: ^nft$vertical_print_density;

      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$device_alias_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 1',
                display_control, status);

        = nfc$device_alias_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 2',
                display_control, status);

        = nfc$device_alias_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 3',
                display_control, status);

        = nfc$file_acknowledge =
          NEXT file_ack IN log_file_seq.sequence_pointer;
          put_display_line (boolean_values [file_ack^],
                '    File Acknowledgement', display_control, status);

        = nfc$terminal_model =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Terminal Model',
                display_control, status);

        = nfc$transmission_block_size =
          NEXT transmission_block_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (transmission_block_size^, 10, FALSE,
                str, status);
          put_display_line (str.value (1, str.size),
                '    Transmission Block Size', display_control, status);

        = nfc$maximum_file_size =
          NEXT maximum_file_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (maximum_file_size^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Maximum File Size',
                display_control, status);

        = nfc$page_width =
          NEXT page_width IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (page_width^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Page Width',
                display_control, status);

        = nfc$page_length =
          NEXT page_length IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (page_length^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Page Length',
                display_control, status);

        = nfc$banner_page_count =
          NEXT banner_page_count IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (banner_page_count^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Banner Page Count',
                display_control, status);

        = nfc$banner_highlight_field =
          NEXT banner_highlight_field IN log_file_seq.sequence_pointer;
          put_display_line (banner_highlight_fields [banner_highlight_field^],
                '    Banner_Highlight_Field', display_control, status);

        = nfc$carriage_control_action =
          NEXT carriage_control_action IN log_file_seq.sequence_pointer;
          put_display_line (carriage_control_actions
                [carriage_control_action^], '    Carriage Control Action',
                display_control, status);

        = nfc$forms_code_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 1', display_control,
                status);

        = nfc$forms_code_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 2', display_control,
                status);

        = nfc$forms_code_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 3', display_control,
                status);

        = nfc$forms_code_4 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 4', display_control,
                status);

        = nfc$external_characteristics_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 1',
                display_control, status);

        = nfc$external_characteristics_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 2',
                display_control, status);

        = nfc$external_characteristics_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 3',
                display_control, status);

        = nfc$external_characteristics_4 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 4',
                display_control, status);

        = nfc$code_set =
          NEXT code_set IN log_file_seq.sequence_pointer;
          put_display_line (code_sets [code_set^], '    Code_Set',
                display_control, status);

        = nfc$vertical_print_density =
          NEXT vertical_print_density IN log_file_seq.sequence_pointer;
          put_display_line (vpd_actions [vertical_print_density^],
                '    Vertical_Print_Density', display_control, status);

        = nfc$vfu_load_procedure =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    VFU Load Image',
                display_control, status);

        = nfc$forms_size =
          NEXT forms_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (forms_size^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Forms_Size',
                display_control, status);

        = nfc$undefined_fe_action =
          NEXT undefined_fe_action IN log_file_seq.sequence_pointer;
          put_display_line (format_effector_actions [undefined_fe_action^],
                '    Un_Defined_FE_Action', display_control, status);

        = nfc$unsupported_fe_action =
          NEXT unsupported_fe_action IN log_file_seq.sequence_pointer;
          put_display_line (format_effector_actions [unsupported_fe_action^],
                '    Un_Supported_FE_Action', display_control, status);


        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND change_batch_device_attributes;
?? TITLE := '    change batch device attributes response msg', EJECT ??

    PROCEDURE change_batch_device_attr_resp
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$change_bd_attr_resp_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        banner_page_count: ^nft$banner_page_count,
        banner_highlight_field: ^nft$banner_highlight_field,
        carriage_control_action: ^nft$carriage_control_action,
        code_set: ^nft$code_set,
        file_ack: ^boolean,
        forms_size: ^nft$forms_size,
        invalid_param: ^nft$change_bda_resp_parameters,
        msg_length: integer,
        maximum_file_size: ^nft$device_file_size,
        page_length: ^nft$page_length,
        page_width: ^nft$page_width,
        parameter: ^nft$change_bd_attr_resp_param,
        str: ost$string,
        transmission_block_size: ^nft$transmit_block_size,
        undefined_fe_action: ^nft$format_effector_actions,
        unsupported_fe_action: ^nft$format_effector_actions,
        value_length: integer,
        vertical_print_density: ^nft$vertical_print_density;

      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$device_alias_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 1',
                display_control, status);

        = nfc$device_alias_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 2',
                display_control, status);

        = nfc$device_alias_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 3',
                display_control, status);

        = nfc$file_acknowledgement =
          NEXT file_ack IN log_file_seq.sequence_pointer;
          put_display_line (boolean_values [file_ack^],
                '    File Acknowledgement', display_control, status);

        = nfc$terminal_model =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Terminal Model',
                display_control, status);

        = nfc$transmission_block_size =
          NEXT transmission_block_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (transmission_block_size^, 10, FALSE,
                str, status);
          put_display_line (str.value (1, str.size),
                '    Transmission Block Size', display_control, status);

        = nfc$maximum_file_size =
          NEXT maximum_file_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (maximum_file_size^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Maximum File Size',
                display_control, status);

        = nfc$page_width =
          NEXT page_width IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (page_width^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Page Width',
                display_control, status);

        = nfc$page_length =
          NEXT page_length IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (page_length^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Page Length',
                display_control, status);

        = nfc$banner_page_count =
          NEXT banner_page_count IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (banner_page_count^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Banner Page Count',
                display_control, status);

        = nfc$banner_highlight_field =
          NEXT banner_highlight_field IN log_file_seq.sequence_pointer;
          put_display_line (banner_highlight_fields [banner_highlight_field^],
                '    Banner_Highlight_Field', display_control, status);

        = nfc$carriage_control_action =
          NEXT carriage_control_action IN log_file_seq.sequence_pointer;
          put_display_line (carriage_control_actions
                [carriage_control_action^], '    Carriage Control Action',
                display_control, status);

        = nfc$forms_code_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 1', display_control,
                status);

        = nfc$forms_code_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 2', display_control,
                status);

        = nfc$forms_code_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 3', display_control,
                status);

        = nfc$forms_code_4 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 4', display_control,
                status);

        = nfc$external_characteristics_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 1',
                display_control, status);

        = nfc$external_characteristics_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 2',
                display_control, status);

        = nfc$external_characteristics_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 3',
                display_control, status);

        = nfc$external_characteristics_4 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 4',
                display_control, status);

        = nfc$code_set =
          NEXT code_set IN log_file_seq.sequence_pointer;
          put_display_line (code_sets [code_set^], '    Code_Set',
                display_control, status);

        = nfc$vertical_print_density =
          NEXT vertical_print_density IN log_file_seq.sequence_pointer;
          put_display_line (vpd_actions [vertical_print_density^],
                '    Vertical Print Density', display_control, status);

        = nfc$vfu_load_procedure =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    VFU Load Image',
                display_control, status);

        = nfc$forms_size =
          NEXT forms_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (forms_size^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Forms_Size',
                display_control, status);

        = nfc$undefined_fe_action =
          NEXT undefined_fe_action IN log_file_seq.sequence_pointer;
          put_display_line (format_effector_actions [undefined_fe_action^],
                '    Un_Defined_FE_Action', display_control, status);

        = nfc$unsupported_fe_action =
          NEXT unsupported_fe_action IN log_file_seq.sequence_pointer;
          put_display_line (format_effector_actions [unsupported_fe_action^],
                '    Un_Supported_FE_Action', display_control, status);

        = nfc$invalid_chg_request =
          NEXT invalid_param IN log_file_seq.sequence_pointer;
          put_display_line (chabda_parameters [invalid_param^],
                '    Invalid Parameter', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND change_batch_device_attr_resp;
?? TITLE := '    delete batch device msg', EJECT ??

    PROCEDURE delete_batch_device_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$delete_batch_device_message

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$del_bd_message_parameter,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND delete_batch_device_msg;
?? TITLE := '    delete batch device response msg', EJECT ??

    PROCEDURE delete_batch_device_resp_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$add_del_device_response
*copy nft$delete_bd_resp_codes

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$add_del_bd_resp_parameter,
        response: string (40),
        response_code: ^nft$delete_bd_responses,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$message_accepted =
            response := 'Message Accepted';
          = nfc$no_io_station_found =
            response := 'Message Rejected, no io station';
          = nfc$no_device_found =
            response := 'Message Rejected, no device';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND delete_batch_device_resp_msg;
?? TITLE := '    delete destination msg', EJECT ??

    PROCEDURE delete_destination_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$delete_destination_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$delete_destination_param,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$destination_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Destination', display_control,
                status);

        = nfc$control_facility_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Control Facility',
                display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND delete_destination_msg;
?? TITLE := '    delete io station msg', EJECT ??

    PROCEDURE delete_io_station_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$delete_io_station_message

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$del_ios_message_parameter,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND delete_io_station_msg;
?? TITLE := '    delete io station response msg', EJECT ??

    PROCEDURE delete_io_station_resp_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$delete_io_station_response
*copy nft$delete_ios_resp_codes

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$del_ios_resp_msg_parameter,
        response: string (40),
        response_code: ^nft$delete_io_station_responses,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$message_accepted =
            response := 'Message Accepted';
          = nfc$no_io_station =
            response := 'Message Rejected, no io station';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND delete_io_station_resp_msg;
?? TITLE := '    delete ntf user response', EJECT ??

    PROCEDURE delete_ntf_user_response
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$ntf_delete_user_resp
*copyc nft$ntf_delete_user_resp_codes

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$ntf_delete_user_resp,
        response: string (45),
        response_code: ^nft$ntf_delete_user_resp_codes,
        str: ost$string,
        value_length: integer;

      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$ntf_remote_system_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Remote System', display_control,
                status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$message_accepted =
            response := 'Message Accepted';
          = nfc$ntf_remote_system_not_found =
            response := 'Message Rejected, remote system not found';
          = nfc$ntf_operator_not_connected =
            response := 'Message Rejected, operator not connected';
          CASEND;
          put_display_line (response, '    Response Code', display_control, status);
        ELSE
{ ERROR
          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;
        CASEND;

        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND delete_ntf_user_response;
?? TITLE := '    device control resp msg', EJECT ??

    PROCEDURE device_control_resp_msg
      (VAR msg_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$device_control_resp_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        parameter: ^nft$device_control_resp_param,
        response: string (31),
        response_code: ^nft$device_control_resp_codes,
        value_length: integer,
        z_byte: ^0 .. 0ff(16);

      msg_length := msg_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <= nfc$response_code) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$dc_msg_accepted =
            response := 'Message Accepted';
          = nfc$dc_msg_reject_unknown_ios =
            response := 'Msg Rej, no io station';
          = nfc$dc_msg_reject_btfsdi_down =
            response := 'Msg Rej, BTFS DI down';
          = nfc$dc_msg_reject_unknown_dev =
            response := 'Msg Rej, no device';
          = nfc$dc_msg_reject_bad_dev_type =
            response := 'Msg Rej, bad dev type';
          = nfc$dc_msg_reject_bad_data_mode =
            response := 'Msg Rej, bad data mode';
          = nfc$dc_msg_rej_unsupported_vfu =
            response := 'Msg Rej, unsupported VFU';
          = nfc$dc_msg_rej_vfu_ld_outstand =
            response := 'Msg Rej, VFU ld req outstanding';
          = nfc$dc_msg_rej_image_not_found =
            response := 'Msg Rej, ld image not found';
          = nfc$dc_msg_rej_err_in_vfu_image =
            response := 'Msg Rej, error in VFU ld image';
          = nfc$dc_msg_rej_trm_undefined =
            response := 'Msg Rej, trm undefined';
          = nfc$dc_msg_rej_vfu_not_allow =
            response := 'Msg Rej, VFU not allowed';
          = nfc$dc_msg_rej_low_di_memory =
            response := 'Msg Rej, DI memory too low';

          CASEND;
          put_display_line (response, '    Response', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          IF msg_length > 1 THEN
            NEXT parameter IN log_file_seq.sequence_pointer;
          ELSE
            NEXT z_byte IN log_file_seq.sequence_pointer;
            parameter := NIL;
            msg_length := 0;
          IFEND;
        IFEND;
      WHILEND;

      IF msg_length > 0 THEN
        RESET log_file_seq.sequence_pointer TO parameter;
      IFEND;

    PROCEND device_control_resp_msg;
?? TITLE := '    device status data msg', EJECT ??

    PROCEDURE device_status_data_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$device_status_data_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        banner_page_count: ^nft$banner_page_count,
        banner_highlight_field: ^nft$banner_highlight_field,
        carriage_control_action: ^nft$carriage_control_action,
        code_set: ^nft$code_set,
        device_status: ^nft$device_status,
        device_type: ^nft$device_type,
        file_ack: ^boolean,
        file_transfer_status: ^nft$file_transfer_status,
        forms_size: ^nft$forms_size,
        input_bytes_transferred: ^nft$input_job_size,
        logical_line_number: ^nft$ntf_logical_line_number,
        maximum_file_size: ^nft$device_file_size,
        msg_length: integer,
        page_width: ^nft$page_width,
        page_length: ^nft$page_length,
        parameter: ^nft$device_sd_msg_param,
        percent_complete: ^nft$file_position,
        response: string (31),
        response_code: ^nft$display_status_resp_codes,
        skip_punch_count: ^nft$ntf_skip_punch_count,
        str: ost$string,
        suppress_carriage_control: ^nft$suppress_carriage_control,
        text: ^string ( * ),
        transmission_block_size: ^nft$transmit_block_size,
        transparent_mode: ^boolean,
        undefined_fe_action: ^nft$format_effector_actions,
        unsupported_fe_action: ^nft$format_effector_actions,
        value_length: integer,
        vertical_print_density: ^nft$vertical_print_density,
        vfu_load_option: ^nft$vfu_load_option;

      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          IF (parameter^.param <> nfc$null_parameter) THEN
            value_length := 1;
            msg_length := msg_length - 1;
          IFEND;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$disp_msg_accepted =
            response := 'Message Accepted';
          = nfc$disp_no_io_station =
            response := 'Message Rejected, no io station';
          = nfc$disp_no_batch_device =
            response := 'Message Rejected, no batch device';
          = nfc$disp_unknown_file_name =
            response := 'Message Rejected, unknown file';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        = nfc$device_status =
          NEXT device_status IN log_file_seq.sequence_pointer;
          put_display_line (device_statuses [device_status^],
                '    Device Status', display_control, status);

        = nfc$device_type =
          NEXT device_type IN log_file_seq.sequence_pointer;
          put_display_line (device_types [device_type^], '    Device Type',
                display_control, status);

        = nfc$file_transfer_status_param =
          NEXT file_transfer_status IN log_file_seq.sequence_pointer;
          put_display_line (file_transfer_statuses [file_transfer_status^],
                '    File Transfer Status', display_control, status);

        = nfc$terminal_model =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Terminal Model',
                display_control, status);

        = nfc$file_acknowledgement =
          NEXT file_ack IN log_file_seq.sequence_pointer;
          put_display_line (boolean_values [file_ack^],
                '    File Acknowledgement', display_control, status);

        = nfc$maximum_file_size =
          NEXT maximum_file_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (maximum_file_size^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Maximum File Size',
                display_control, status);

        = nfc$page_width =
          NEXT page_width IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (page_width^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Page Width',
                display_control, status);

        = nfc$page_length =
          NEXT page_length IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (page_length^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Page Length',
                display_control, status);

        = nfc$banner_page_count =
          NEXT banner_page_count IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (banner_page_count^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Banner Page Count',
                display_control, status);

        = nfc$banner_highlight_field =
          NEXT banner_highlight_field IN log_file_seq.sequence_pointer;
          put_display_line (banner_highlight_fields [banner_highlight_field^],
                '    Banner_Highlight_Field', display_control, status);

        = nfc$transmission_block_size =
          NEXT transmission_block_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (transmission_block_size^, 10, FALSE,
                str, status);
          put_display_line (str.value (1, str.size),
                '    Transmission Block Size', display_control, status);

        = nfc$carriage_control_action =
          NEXT carriage_control_action IN log_file_seq.sequence_pointer;
          put_display_line (carriage_control_actions
                [carriage_control_action^], '    Carriage Control Action',
                display_control, status);

        = nfc$forms_code_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 1', display_control,
                status);

        = nfc$forms_code_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 2', display_control,
                status);

        = nfc$forms_code_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 3', display_control,
                status);

        = nfc$forms_code_4 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code 4', display_control,
                status);

        = nfc$external_characteristics_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 1',
                display_control, status);

        = nfc$external_characteristics_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 2',
                display_control, status);

        = nfc$external_characteristics_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 3',
                display_control, status);

        = nfc$external_characteristics_4 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char 4',
                display_control, status);

        = nfc$suppress_carriage_control =
          NEXT suppress_carriage_control IN log_file_seq.sequence_pointer;
          put_display_line (boolean_values [suppress_carriage_control^],
                '    Suppress Carriage Control', display_control, status);

        = nfc$device_alias_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 1',
                display_control, status);

        = nfc$device_alias_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 2',
                display_control, status);

        = nfc$device_alias_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 3',
                display_control, status);

        = nfc$last_unsolicited_msg =
          NEXT text: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (text^, '    Last Unsolicited Msg', display_control,
                status);

        = nfc$system_file_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    System File Name',
                display_control, status);

        = nfc$user_file_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    User File Name',
                display_control, status);

        = nfc$system_job_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    System Job Name',
                display_control, status);

        = nfc$user_job_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    User Job Name',
                display_control, status);

        = nfc$user_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    User Name', display_control,
                status);

        = nfc$family_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Family', display_control,
                status);

        = nfc$percent_complete =
          NEXT percent_complete IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (percent_complete^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Percent Complete',
                display_control, status);

        = nfc$code_set =
          NEXT code_set IN log_file_seq.sequence_pointer;
          put_display_line (code_sets [code_set^], '    Code_Set',
                display_control, status);

        = nfc$vertical_print_density =
          NEXT vertical_print_density IN log_file_seq.sequence_pointer;
          put_display_line (vpd_actions [vertical_print_density^],
                '    Vertical_Print_Density', display_control, status);

        = nfc$vfu_load_procedure =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    VFU Load Image',
                display_control, status);

        = nfc$forms_size =
          NEXT forms_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (forms_size^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Forms_Size',
                display_control, status);

        = nfc$undefined_fe_action =
          NEXT undefined_fe_action IN log_file_seq.sequence_pointer;
          put_display_line (format_effector_actions [undefined_fe_action^],
                '    Un_Defined_FE_Action', display_control, status);

        = nfc$unsupported_fe_action =
          NEXT unsupported_fe_action IN log_file_seq.sequence_pointer;
          put_display_line (format_effector_actions [unsupported_fe_action^],
                '    Un_Supported_FE_Action', display_control, status);

        = nfc$vfu_load_option =
          NEXT vfu_load_option IN log_file_seq.sequence_pointer;
          put_display_line (vfu_load_option_actions [vfu_load_option^],
                '    Vertical_Forms_Unit', display_control, status);

        = nfc$destination_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Job Dest Name',
                display_control, status);

        = nfc$input_bytes_transferred =
          NEXT input_bytes_transferred IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (input_bytes_transferred^, 10, FALSE,
                str, status);
          put_display_line (str.value (1, str.size), '    Input Bytes',
                display_control, status);

        = nfc$ntf_logical_line_number =
          NEXT logical_line_number IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (logical_line_number^, 10, FALSE,
                str, status);
          put_display_line (str.value (1, str.size), '    Logical Line Number',
                display_control, status);

        = nfc$transparent_mode =
          NEXT transparent_mode IN log_file_seq.sequence_pointer;
          IF transparent_mode^ THEN
            str.value := 'True ';
          ELSE
            str.value := 'False';
          IFEND;
          put_display_line (str.value (1, 5), '    Transparent Mode',
                display_control, status);

        = nfc$ntf_skip_punch_count =
          NEXT skip_punch_count IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (skip_punch_count^, 10, FALSE,
                str, status);
          put_display_line (str.value (1, str.size), '    Skip Punch Count',
                display_control, status);

        = nfc$null_parameter =
          IF msg_length > 0 THEN
            put_display_line (' ', '    (Null)', display_control, status);
          IFEND;

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND device_status_data_msg;
?? TITLE := '    display file availability msg', EJECT ??

    PROCEDURE display_file_availability_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$file_availability_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        boolean_value: ^boolean,
        copies: ^nft$copies,
        device_type: ^nft$device_type,
        file_size: ^nft$file_size,
        file_transfer_state: ^nft$file_transfer_state,
        io_station_usage: ^nft$io_station_usage,
        msg_length: integer,
        output_data_mode: ^nft$output_data_mode,
        page_format: ^amt$page_format,
        page_length: ^nft$page_length,
        page_width: ^nft$page_width,
        parameter: ^nft$file_available_msg_param,
        priority: ^nft$priority,
        priority_factor: ^nft$priority_multiplier,
        str: ost$string,
        value_length: integer,
        vertical_print_density: ^nft$file_vertical_print_density;

      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$operator_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Operator Name',
                display_control, status);

        = nfc$operator_family =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Operator Family',
                display_control, status);

        = nfc$station_usage =
          NEXT io_station_usage IN log_file_seq.sequence_pointer;
          put_display_line (station_usages [io_station_usage^],
                '    I/O Station Usage', display_control, status);

        = nfc$system_file_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    System File Name',
                display_control, status);

        = nfc$system_job_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    System Job Name',
                display_control, status);

        = nfc$user_file_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    User File Name',
                display_control, status);

        = nfc$user_job_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    User Job Name',
                display_control, status);

        = nfc$user_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    User Name', display_control,
                status);

        = nfc$user_family =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    User Family', display_control,
                status);

        = nfc$copies =
          NEXT copies IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (copies^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Copies',
                display_control, status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$device_type =
          NEXT device_type IN log_file_seq.sequence_pointer;
          put_display_line (device_types [device_type^], '    Device Type',
                display_control, status);

        = nfc$external_characteristics =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Ext Dev Char', display_control,
                status);

        = nfc$file_size =
          NEXT file_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (file_size^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    File Size',
                display_control, status);

        = nfc$forms_code =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code', display_control,
                status);

        = nfc$output_data_mode =
          NEXT output_data_mode IN log_file_seq.sequence_pointer;
          put_display_line (output_data_modes [output_data_mode^],
                '    Output Data Mode', display_control, status);

        = nfc$output_initial_priority =
          NEXT priority IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (priority^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size),
                '    Output Initial Priority', display_control, status);

        = nfc$output_maximum_priority =
          NEXT priority IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (priority^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size),
                '    Output Maximum Priority', display_control, status);

        = nfc$output_priority_factor =
          NEXT priority_factor IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (priority^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size),
                '    Output Priority Factor', display_control, status);

        = nfc$output_state =
          NEXT file_transfer_state IN log_file_seq.sequence_pointer;
          put_display_line (file_transfer_states [file_transfer_state^],
                '    File Transfer State', display_control, status);

        = nfc$page_format =
          NEXT page_format IN log_file_seq.sequence_pointer;
          put_display_line (page_formats [page_format^], '    Page Format',
                display_control, status);

        = nfc$page_length =
          NEXT page_length IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (page_length^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Page Length',
                display_control, status);

        = nfc$page_width =
          NEXT page_width IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (page_width^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Page Width',
                display_control, status);

        = nfc$vertical_print_density =
          NEXT vertical_print_density IN log_file_seq.sequence_pointer;
          put_display_line (file_vpd_actions [vertical_print_density^],
                '    Vertical_Print_Density', display_control, status);

        = nfc$vfu_load_procedure =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    VFU Load Image',
                display_control, status);

        = nfc$file_requeued =
          NEXT boolean_value IN log_file_seq.sequence_pointer;
          put_display_line (boolean_values [boolean_value^], '    File Requeued',
                display_control, status);

        = nfc$file_held_by_filter =
          NEXT boolean_value IN log_file_seq.sequence_pointer;
          put_display_line (boolean_values [boolean_value^], '    File Held by Filter',
                display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND display_file_availability_msg;
?? TITLE := '    file assignment msg', EJECT ??

    PROCEDURE file_assignment_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$file_assignment_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        banner_highlight_field: ^nft$banner_highlight_field,
        banner_page_count: ^nft$banner_page_count,
        btfs_di_address: ^nft$network_address,
        carriage_control_support: ^nft$carriage_control_action,
        code_set: ^nft$code_set,
        device_type: ^nft$device_type,
        dev_vertical_print_density: ^nft$vertical_print_density,
        file_ack: ^boolean,
        forms_size: ^nft$forms_size,
        maximum_file_size: ^nft$device_file_size,
        msg_length: integer,
        parameter: ^nft$file_assign_msg_parameter,
        value_length: integer,
        copies: ^nft$copies,
        io_station_usage: ^nft$io_station_usage,
        page_width: ^nft$page_width,
        priority: ^nft$priority,
        protocol: ^nft$ntf_remote_system_protocol,
        remote_system_type: ^nft$ntf_remote_system_type,
        route_back_position: ^nft$ntf_route_back_position,
        str: ost$string,
        tip_type: ^nft$tip_type,
        transmission_block_size: ^nft$transmit_block_size,
        undefined_fe_action: ^nft$format_effector_actions,
        unsupported_fe_action: ^nft$format_effector_actions,
        vertical_print_density: ^nft$file_vertical_print_density,
        vfu_load_option: ^nft$vfu_load_option;

      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$banner_highlight_field =
          NEXT banner_highlight_field IN log_file_seq.sequence_pointer;
          put_display_line (banner_highlight_fields [banner_highlight_field^],
                '    Banner_Highlight_Field', display_control, status);

        = nfc$banner_page_count =
          NEXT banner_page_count IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (banner_page_count^, {radix} 10, {include radix} FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Banner Page Count',
                display_control, status);

        = nfc$btfs_di_title =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    BTFS/DI Title',
                display_control, status);

        = nfc$btfsdi_address =
          NEXT btfs_di_address IN log_file_seq.sequence_pointer;
          display_btfs_di_address (btfs_di_address, display_control,
                log_file_seq, status);

        = nfc$carriage_control_support =
          NEXT carriage_control_support IN log_file_seq.sequence_pointer;
          put_display_line (carriage_control_actions
                [carriage_control_support^], '    Carriage Control Support',
                display_control, status);

        = nfc$code_set =
          NEXT code_set IN log_file_seq.sequence_pointer;
          put_display_line (code_sets [code_set^], '    Code Set',
                display_control, status);

        = nfc$copies =
          NEXT copies IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (copies^, {radix} 10, {include radix} FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Copies',
                display_control, status);

        = nfc$dev_vertical_print_density =
          NEXT dev_vertical_print_density IN log_file_seq.sequence_pointer;
          put_display_line (vpd_actions [dev_vertical_print_density^],
                '    Device VPD', display_control, status);

        = nfc$dev_vfu_load_procedure =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device VFU Load Proc',
                display_control, status);

        = nfc$device_alias_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 1',
                display_control, status);

        = nfc$device_alias_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 2',
                display_control, status);

        = nfc$device_alias_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Alias 3',
                display_control, status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$device_type =
          NEXT device_type IN log_file_seq.sequence_pointer;
          put_display_line (device_types [device_type^], '    Device Type',
                display_control, status);

        = nfc$external_characteristics =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    External Characteristics',
                display_control, status);

        = nfc$external_characteristics_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device EC 1',
                display_control, status);

        = nfc$external_characteristics_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device EC 2',
                display_control, status);

        = nfc$external_characteristics_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device EC 3',
                display_control, status);

        = nfc$external_characteristics_4 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device EC 4',
                display_control, status);

        = nfc$file_acknowledgement =
          NEXT file_ack IN log_file_seq.sequence_pointer;
          put_display_line (boolean_values [file_ack^],
                '    File Acknowledgement', display_control, status);

        = nfc$forms_code =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Forms Code', display_control,
                status);

        = nfc$forms_code_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Forms Code 1',
                display_control, status);

        = nfc$forms_code_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Forms Code 2',
                display_control, status);

        = nfc$forms_code_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Forms Code 3',
                display_control, status);

        = nfc$forms_code_4 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device Forms Code 4',
                display_control, status);

        = nfc$forms_size =
          NEXT forms_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (forms_size^, {radix} 10, {include radix} FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Forms Size',
                display_control, status);

        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$maximum_file_size =
          NEXT maximum_file_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (maximum_file_size^, {radix} 10, {include radix} FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Maximum File Size',
                display_control, status);

        = nfc$ntf_remote_system_protocol =
          NEXT  protocol  IN log_file_seq.sequence_pointer;
          put_display_line (remote_system_protocols [protocol^], '    Remote System Protocol',
                display_control, status);

        = nfc$ntf_remote_system_type =
          NEXT remote_system_type IN log_file_seq.sequence_pointer;
          put_display_line (remote_system_types [remote_system_type^], '    Remote System Type',
                display_control, status);

        = nfc$ntf_route_back_position =
          NEXT route_back_position IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (route_back_position^, {radix} 10,
              {include radix} FALSE, str, status);
          put_display_line (str.value (1, str.size),
                '    Route Back Position', display_control, status);

        = nfc$operator_family =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Operator Family',
                display_control, status);

        = nfc$operator_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Operator Name',
                display_control, status);

        = nfc$output_initial_priority =
          NEXT priority IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (priority^, {radix} 10, {include radix} FALSE, str, status);
          put_display_line (str.value (1, str.size),
                '    Output Initial Priority', display_control, status);

        = nfc$page_width =
          NEXT page_width IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (page_width^, {radix} 10, {include radix} FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Page Width',
                display_control, status);

        = nfc$requested_device =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Requested Device',
                display_control, status);

        = nfc$requested_io_station =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Requested Station',
                display_control, status);

        = nfc$station_usage =
          NEXT io_station_usage IN log_file_seq.sequence_pointer;
          put_display_line (station_usages [io_station_usage^],
                '    I/O Station Usage', display_control, status);

        = nfc$system_file_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    System File Name',
                display_control, status);

        = nfc$terminal_model =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Terminal Model',
                display_control, status);

        = nfc$tip_type =
          NEXT tip_type IN log_file_seq.sequence_pointer;
          put_display_line (tip_types [tip_type^], '    Tip Type',
                display_control, status);

        = nfc$transmission_block_size =
          NEXT transmission_block_size IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (transmission_block_size^, {radix} 10, {include radix} FALSE,
                str, status);
          put_display_line (str.value (1, str.size),
                '    Transmission Block Size', display_control, status);

        = nfc$undefined_fe_action =
          NEXT undefined_fe_action IN log_file_seq.sequence_pointer;
          put_display_line (format_effector_actions [undefined_fe_action^],
                '    Un_Defined_FE_Action', display_control, status);

        = nfc$unsupported_fe_action =
          NEXT unsupported_fe_action IN log_file_seq.sequence_pointer;
          put_display_line (format_effector_actions [unsupported_fe_action^],
                '    Un_Supported_FE_Action', display_control, status);

        = nfc$vertical_print_density =
          NEXT vertical_print_density IN log_file_seq.sequence_pointer;
          put_display_line (file_vpd_actions [vertical_print_density^],
                '    Vertical Print Density', display_control, status);

        = nfc$vfu_load_option =
          NEXT vfu_load_option IN log_file_seq.sequence_pointer;
          put_display_line (vfu_load_option_actions [vfu_load_option^],
                '    Device VFU Load Option', display_control, status);

        = nfc$vfu_load_procedure =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    VFU Load Image',
                display_control, status);


        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND file_assignment_msg;
?? TITLE := '    file assignment response msg', EJECT ??

    PROCEDURE file_assignment_response_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$file_assignment_resp_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$file_assign_resp_parameter,
        response: string (24),
        response_code: ^nft$file_assignment_response,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$system_file_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    System File Name',
                display_control, status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$file_assignment_accepted =
            response := 'File Assignment Accepted';
          = nfc$file_assignment_rejected =
            response := 'File Assignment Rejected';
          = nfc$btfsdi_title_not_translated =
            response := 'BTFS/DI Title Not Translated';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND file_assignment_response_msg;
?? TITLE := '    file transfer status msg', EJECT ??

    PROCEDURE file_transfer_status_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$file_status_message

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        device_status: ^nft$device_status,
        file_position: ^nft$file_position,
        file_transfer_status: ^nft$file_transfer_status,
        input_bytes_transferred: ^nft$input_job_size,
        msg_length: integer,
        parameter: ^nft$file_status_message_param,
        str: ost$string,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$device_status =
          NEXT device_status IN log_file_seq.sequence_pointer;
          put_display_line (device_statuses [device_status^],
                '    Device Status', display_control, status);

        = nfc$file_transfer_status_param =
          NEXT file_transfer_status IN log_file_seq.sequence_pointer;
          put_display_line (file_transfer_statuses [file_transfer_status^],
                '    File Transfer Status', display_control, status);

        = nfc$file_position =
          NEXT file_position IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (file_position^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    File Position',
                display_control, status);

        = nfc$system_job_file_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    System Job/File Name',
                display_control, status);

        = nfc$system_id_family =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    System Family',
                display_control, status);

        = nfc$user_job_file_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    User Job/File Name',
                display_control, status);

        = nfc$actual_destination =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Actual Destination',
                display_control, status);

        = nfc$requested_destination =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Requested Destination',
                display_control, status);

        = nfc$input_bytes_transferred =
          NEXT input_bytes_transferred IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (input_bytes_transferred^, 10, FALSE,
                str, status);
          put_display_line (str.value (1, str.size),
                '    Input Bytes Transferred', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND file_transfer_status_msg;
?? TITLE := '    get device status msg', EJECT ??

    PROCEDURE get_device_status_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$get_device_status_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$get_device_status_param,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND get_device_status_msg;
?? TITLE := '    get ntf rem sys names data', EJECT ??

    PROCEDURE get_ntf_rem_sys_names_data
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$ntf_get_rem_sys_names_data
*copyc nft$display_status_resp_codes

      VAR
        count: ^integer,
        i: integer,
        msg_length: integer,
        parameter: ^nft$ntf_get_rem_sys_names_data,
        remote_system_count: integer,
        remote_system_name_data: ^nft$ntf_remote_system_data,
        response: string (40),
        response_code: ^nft$display_status_resp_codes,
        str: ost$string,
        value_length: integer;

      remote_system_count := 0;
      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$disp_msg_accepted =
            response := 'Message Accepted';
          = nfc$disp_no_io_station =
            response := 'Message Rejected, no io station';
          = nfc$disp_no_batch_device =
            response := 'Message Rejected, no batch device';
          = nfc$disp_unknown_file_name =
            response := 'Message Rejected, unknown file';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        = nfc$ntf_remote_system_count =
          NEXT count IN log_file_seq.sequence_pointer;
          remote_system_count := count^;
          clp$convert_integer_to_string (count^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Remote System Count',
                display_control, status);

        = nfc$ntf_remote_system_data =
          IF remote_system_count <> 0 THEN
            FOR i := 1 TO remote_system_count DO
              NEXT remote_system_name_data: [value_length -
                    #SIZE (nft$ntf_remote_system_data: [0])] IN
                    log_file_seq.sequence_pointer;
              put_display_line (remote_system_name_data^.name, '    Remote System', display_control,
                    status);
              put_display_line (remote_system_types [remote_system_name_data^.remote_system_type],
                    '    Remote System Type', display_control, status);
              put_display_line (remote_system_kinds [remote_system_name_data^.kind],
                    '    Remote System Kind', display_control, status);
              clp$convert_integer_to_string (remote_system_name_data^.route_back_position, 10, FALSE, str,
                    status);
              put_display_line (str.value (1, str.size),
                    '    Route Back Position', display_control, status);
              put_display_line (authority_levels [remote_system_name_data^.authority_level],
                    '    Authority Level', display_control, status);
            FOREND;
          IFEND;

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND get_ntf_rem_sys_names_data;
?? TITLE := '    get ntf remote system names msg', EJECT ??

    PROCEDURE get_ntf_remote_system_names_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$ntf_get_rem_sys_names_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        line_number: ^nft$ntf_logical_line_number,
        remote_system_type: ^nft$ntf_remote_system_type,
        msg_length: integer,
        parameter: ^nft$ntf_get_rem_sys_names_msg,
        remote_system_kind: ^nft$ntf_remote_system_kind,
        str: ost$string,
        value_length: integer;

      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$ntf_remote_system_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Remote System', display_control,
                status);

        = nfc$ntf_logical_line_number =
          NEXT line_number IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (line_number^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Logical Line Number',
                display_control, status);

        = nfc$ntf_remote_system_kind =
          NEXT remote_system_kind IN log_file_seq.sequence_pointer;
          put_display_line (remote_system_kinds [remote_system_kind^], '    Remote System Kind',
                display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND get_ntf_remote_system_names_msg;
?? TITLE := '    get queue entry msg', EJECT ??

    PROCEDURE get_queue_entry_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$get_queue_entry_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$get_queue_entry_parameter,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$system_file_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    File Name', display_control,
                status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND get_queue_entry_msg;
?? TITLE := '    get queue entry list msg', EJECT ??

    PROCEDURE get_queue_entry_list_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$get_q_entry_list_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        entries: ^nft$all_or_top_10_q_entries,
        msg_length: integer,
        optimize_queue_list_param: ^nft$optimize_list,
        parameter: ^nft$get_q_entry_list_msg_param,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$all_or_top_ten =
          NEXT entries IN log_file_seq.sequence_pointer;
          put_display_line (all_or_top_10 [entries^], '   All or Top 10',
                display_control, status);

        = nfc$optimize_queue_list =
          NEXT optimize_queue_list_param IN log_file_seq.sequence_pointer;
          IF (optimize_queue_list_param^ = nfc$do_optimize) THEN
            put_display_line ('Yes', '    Optimize Queue List', display_control, status);
          ELSE
            put_display_line ('No', '    Optimize Queue List', display_control, status);
          IFEND;

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND get_queue_entry_list_msg;
?? TITLE := '    get queue status msg', EJECT ??

    PROCEDURE get_queue_status_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$get_station_status_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$get_station_status_param,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND get_queue_status_msg;
?? TITLE := '    get station status msg', EJECT ??

    PROCEDURE get_station_status_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$get_station_status_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        optimize_device_list_param: ^nft$optimize_list,
        parameter: ^nft$get_station_status_param,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$optimize_device_list =
          NEXT optimize_device_list_param IN log_file_seq.sequence_pointer;
          IF (optimize_device_list_param^ = nfc$do_optimize) THEN
            put_display_line ('Yes', '    Optimize Device List', display_control, status);
          ELSE
            put_display_line ('No', '    Optimize Device List', display_control, status);
          IFEND;

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND get_station_status_msg;
?? TITLE := '    operator message', EJECT ??

    PROCEDURE operator_message
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$operator_message

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$operator_message_parameter,
        text: ^string ( * ),
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$text =
          NEXT text: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (text^, '    Text', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND operator_message;
?? TITLE := '    position file msg to di', EJECT ??

    PROCEDURE position_file_msg_to_di
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copy nft$di_position_file_message

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$position_file_di_msg_param,
        position_parameters: ^string ( * ),
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$position_parameters =
          NEXT position_parameters: [value_length] IN
                log_file_seq.sequence_pointer;
          put_display_line (position_parameters^, '    Position Parameters',
                display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND position_file_msg_to_di;
?? TITLE := '    position file msg', EJECT ??

    PROCEDURE position_file_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$position_file_msg

      VAR
        ascii_string: ^string ( * <= nfc$posf_max_string_length),
        direction: ^nft$position_file_direction,
        location_count: ^nft$position_file_locate_count,
        msg_length: integer,
        parameter: ^nft$position_file_msg_parameter,
        preview_count: ^nft$position_file_preview_count,
        start_position: ^nft$position_file_from_position,
        str: ost$string,
        units: ^nft$position_file_units,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$location_integer =
          NEXT location_count IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (location_count^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Location Count',
                display_control, status);

        = nfc$location_string_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    String 1', display_control,
                status);

        = nfc$location_string_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    String 2', display_control,
                status);

        = nfc$units =
          NEXT units IN log_file_seq.sequence_pointer;

        = nfc$direction =
          NEXT direction IN log_file_seq.sequence_pointer;

        = nfc$starting_position =
          NEXT start_position IN log_file_seq.sequence_pointer;

        = nfc$preview_line_count =
          NEXT preview_count IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (preview_count^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Preview Line Count',
                display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND position_file_msg;
?? TITLE := '    queue entry data msg', EJECT ??

    PROCEDURE queue_entry_data_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$queue_entry_data_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        copies: ^nft$copies,
        date: ost$date,
        device_type: ^nft$device_type,
        file_length: ^nft$file_size,
        msg_length: integer,
        output_data_mode: ^nft$output_data_mode,
        output_state: ^nft$file_transfer_state,
        output_state_string: string (31),
        page_format: ^amt$page_format,
        page_length: ^nft$page_length,
        page_width: ^nft$page_width,
        parameter: ^nft$queue_entry_msg_parameter,
        priority: ^nft$priority,
        q_position: ^integer,
        response_code: ^nft$display_status_resp_codes,
        response: string (33),
        str: ost$string,
        time: ost$time,
        time_enqueued: ^ost$date_time,
        value_length: integer,
        vertical_print_density: ^nft$file_vertical_print_density,
        z_byte: ^0 .. 0ff(16);

      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (msg_length > 0) DO
        WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter)
              DO
          msg_length := msg_length - 1;
          IF parameter^.length_indicated THEN
            get_parameter_value_length (log_file_seq, msg_length, value_length,
                  status);
            msg_length := msg_length - value_length;
          ELSE
            value_length := 1;
            msg_length := msg_length - 1;
          IFEND;

          CASE parameter^.param OF
          = nfc$io_station_name =
            NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
            put_display_line (ascii_string^, '    Station', display_control,
                  status);

          = nfc$system_file_name =
            NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
            put_display_line (ascii_string^, '    System File Name',
                  display_control, status);

          = nfc$response_code =
            NEXT response_code IN log_file_seq.sequence_pointer;
            CASE response_code^ OF
            = nfc$disp_msg_accepted =
              response := 'Message Accepted';
            = nfc$disp_no_io_station =
              response := 'Message Rejected, no io station';
            = nfc$disp_no_batch_device =
              response := 'Message Rejected, no batch device';
            = nfc$disp_unknown_file_name =
              response := 'Message Rejected, unknown file';
            CASEND;
            put_display_line (response, '    Response', display_control,
                  status);

          = nfc$user_file_name =
            NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
            put_display_line (ascii_string^, '    User File Name',
                  display_control, status);

          = nfc$time_enqueued =
            NEXT time_enqueued IN log_file_seq.sequence_pointer;
            pmp$format_compact_date (time_enqueued^, osc$iso_date, date,
                  status);
            pmp$format_compact_time (time_enqueued^, osc$hms_time, time,
                  status);

          = nfc$position_in_queue =
            NEXT q_position IN log_file_seq.sequence_pointer;
            clp$convert_integer_to_string (q_position^, 10, FALSE, str,
                  status);
            put_display_line (str.value (1, str.size), '    Position in Q',
                  display_control, status);

          = nfc$priority =
            NEXT priority IN log_file_seq.sequence_pointer;
            clp$convert_integer_to_string (priority^, 10, FALSE, str, status);
            put_display_line (str.value (1, str.size), '    Priority',
                  display_control, status);

          = nfc$copies =
            NEXT copies IN log_file_seq.sequence_pointer;
            clp$convert_integer_to_string (copies^, 10, FALSE, str, status);
            put_display_line (str.value (1, str.size), '    Copies',
                  display_control, status);

          = nfc$create_job_family_name =
            NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
            put_display_line (ascii_string^, '    User Family Name',
                  display_control, status);

          = nfc$create_system_job_name =
            NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
            put_display_line (ascii_string^, '    System Job Name',
                  display_control, status);

          = nfc$create_user_job_name =
            NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
            put_display_line (ascii_string^, '    User Job Name',
                  display_control, status);

          = nfc$destination_name =
            NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
            put_display_line (ascii_string^, '    Destination',
                  display_control, status);

          = nfc$device_type =
            NEXT device_type IN log_file_seq.sequence_pointer;
            put_display_line (device_types [device_type^], '    Device Type',
                  display_control, status);

          = nfc$file_length =
            NEXT file_length IN log_file_seq.sequence_pointer;
            clp$convert_integer_to_string (file_length^, 10, FALSE, str,
                  status);
            put_display_line (str.value (1, str.size), '    File Length',
                  display_control, status);

          = nfc$output_data_mode =
            NEXT output_data_mode IN log_file_seq.sequence_pointer;
            put_display_line (output_data_modes [output_data_mode^],
                  '    Output Data Mode', display_control, status);

          = nfc$device_name =
            NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
            put_display_line (ascii_string^, '    Device', display_control,
                  status);

          = nfc$external_characteristics =
            NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
            put_display_line (ascii_string^, '    External Characteristics',
                  display_control, status);

          = nfc$forms_code =
            NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
            put_display_line (ascii_string^, '    Forms Code', display_control,
                  status);

          = nfc$page_format =
            NEXT page_format IN log_file_seq.sequence_pointer;
            put_display_line (page_formats [page_format^], '    Page Format',
                  display_control, status);

          = nfc$page_length =
            NEXT page_length IN log_file_seq.sequence_pointer;
            clp$convert_integer_to_string (page_length^, 10, FALSE, str,
                  status);
            put_display_line (str.value (1, str.size), '    Page Length',
                  display_control, status);

          = nfc$page_width =
            NEXT page_width IN log_file_seq.sequence_pointer;
            clp$convert_integer_to_string (page_width^, 10, FALSE, str,
                  status);
            put_display_line (str.value (1, str.size), '    Page Width',
                  display_control, status);

          = nfc$vertical_print_density =
            NEXT vertical_print_density IN log_file_seq.sequence_pointer;
            put_display_line (file_vpd_actions [vertical_print_density^],
                  '    Vertical_Print_Density', display_control, status);

          = nfc$vfu_load_procedure =
            NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
            put_display_line (ascii_string^, '    VFU Load Image',
                  display_control, status);

          = nfc$creating_user_name =
            NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
            put_display_line (ascii_string^, '    User Name', display_control,
                  status);

          = nfc$scfs_output_status =
            NEXT output_state IN log_file_seq.sequence_pointer;
            put_display_line (file_transfer_states [output_state^], '    SCFS Output State', display_control,
                  status);

          ELSE

{           ERROR

            NEXT byte_array: [1 .. value_length] IN log_file_seq.sequence_pointer;

          CASEND;
          IF NOT status.normal THEN
            RETURN; {----->
          IFEND;
          IF msg_length > 0 THEN
            NEXT parameter IN log_file_seq.sequence_pointer;
            IF (msg_length = 1) THEN
              IF (parameter^.param = nfc$queue_entry_data_continues) THEN
                put_display_line ('', '    Queue Entry Data Cont.', display_control, status);
              IFEND;
              parameter := NIL;
              msg_length := 0;
            IFEND;
          IFEND;
        WHILEND;
        IF (msg_length > 0) AND (parameter^.param = nfc$null_parameter) THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
          msg_length := msg_length - 1;
          put_display_line (' ', '    (Null)', display_control, status);
        IFEND;
      WHILEND;

    PROCEND queue_entry_data_msg;
?? TITLE := '    queue entry list data msg', EJECT ??

    PROCEDURE queue_entry_list_data_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$q_entry_list_data_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        file_and_priority: ^nft$file_and_priority,
        file_count: ^nft$file_count,
        msg_length: integer,
        parameter: ^nft$q_entry_list_data_msg_param,
        response_code: ^nft$display_status_resp_codes,
        response: string (33),
        str: ost$string,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$disp_msg_accepted =
            response := 'Message Accepted';
          = nfc$disp_no_io_station =
            response := 'Message Rejected, no io station';
          = nfc$disp_no_batch_device =
            response := 'Message Rejected, no batch device';
          = nfc$disp_unknown_file_name =
            response := 'Message Rejected, unknown file';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        = nfc$number_of_files =
          NEXT file_count IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (file_count^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Number of Files',
                display_control, status);

        = nfc$sys_file_and_priority =
          NEXT file_and_priority: [value_length - #SIZE (nft$priority)] IN
                log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (file_and_priority^.priority, 10,
                FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Priority',
                display_control, status);
          put_display_line (file_and_priority^.name, '    System File Name',
                display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND queue_entry_list_data_msg;
?? TITLE := '    queue status data msg', EJECT ??

    PROCEDURE queue_status_data_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

?? NEWTITLE := '      display q status data', EJECT ??

      PROCEDURE display_q_status_data
        (    q_status_data: nft$q_status_data;
         VAR display_control: clt$display_control;
         VAR status: ost$status);

        VAR
          str: ost$string;

        put_display_line (q_status_data.name, '      Name', display_control,
              status);

        clp$convert_integer_to_string (q_status_data.file_count, 10, FALSE,
              str, status);
        put_display_line (str.value (1, str.size), '    File Count',
              display_control, status);

        clp$convert_integer_to_string (q_status_data.total_size, 10, FALSE,
              str, status);
        put_display_line (str.value (1, str.size), '    Total Size',
              display_control, status);

        clp$convert_integer_to_string (q_status_data.oldest_age, 10, FALSE,
              str, status);
        put_display_line (str.value (1, str.size), '    Oldest File Age',
              display_control, status);

        clp$convert_integer_to_string (q_status_data.average_age, 10, FALSE,
              str, status);
        put_display_line (str.value (1, str.size), '    Average Age',
              display_control, status);

        put_display_line (q_status_data.operator_name, '      Operator Name',
              display_control, status);

        put_display_line (q_status_data.operator_family,
              '      Operator Family', display_control, status);

      PROCEND display_q_status_data;
?? OLDTITLE, EJECT ??
*copyc nft$queue_status_data_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        count: ^nft$file_count,
        destination_count: nft$file_count,
        device_count: nft$file_count,
        device_types_count: nft$file_count,
        ext_chars_count: nft$file_count,
        forms_code_count: nft$file_count,
        i: integer,
        msg_length: integer,
        parameter: ^nft$queue_status_msg_parameter,
        q_status_data: ^nft$q_status_data,
        response_code: ^nft$display_status_resp_codes,
        response: string (33),
        str: ost$string,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$file_count =
          NEXT count IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (count^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    File Count',
                display_control, status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$disp_msg_accepted =
            response := 'Message Accepted';
          = nfc$disp_no_io_station =
            response := 'Message Rejected, no io station';
          = nfc$disp_no_batch_device =
            response := 'Message Rejected, no batch device';
          = nfc$disp_unknown_file_name =
            response := 'Message Rejected, unknown file';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        = nfc$ext_chars_count =
          NEXT count IN log_file_seq.sequence_pointer;
          ext_chars_count := count^;
          clp$convert_integer_to_string (count^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Ext Chars Count',
                display_control, status);

        = nfc$ext_char_and_files =
          FOR i := 1 TO ext_chars_count DO
            NEXT q_status_data: [value_length -
                  nfc$fixed_q_status_data_length] IN
                  log_file_seq.sequence_pointer;
            display_q_status_data (q_status_data^, display_control, status);
          FOREND;

        = nfc$forms_code_count =
          NEXT count IN log_file_seq.sequence_pointer;
          forms_code_count := count^;
          clp$convert_integer_to_string (count^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Forms Code Count',
                display_control, status);

        = nfc$forms_code_and_files =
          FOR i := 1 TO forms_code_count DO
            NEXT q_status_data: [value_length -
                  nfc$fixed_q_status_data_length] IN
                  log_file_seq.sequence_pointer;
            display_q_status_data (q_status_data^, display_control, status);
          FOREND;

        = nfc$device_count =
          NEXT count IN log_file_seq.sequence_pointer;
          device_count := count^;
          clp$convert_integer_to_string (count^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Device Count',
                display_control, status);

        = nfc$device_names_and_files =
          FOR i := 1 TO device_count DO
            NEXT q_status_data: [value_length -
                  nfc$fixed_q_status_data_length] IN
                  log_file_seq.sequence_pointer;
            display_q_status_data (q_status_data^, display_control, status);
          FOREND;

        = nfc$destination_count =
          NEXT count IN log_file_seq.sequence_pointer;
          destination_count := count^;
          clp$convert_integer_to_string (count^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Destination Count',
                display_control, status);

        = nfc$destinations_and_files =
          FOR i := 1 TO destination_count DO
            NEXT q_status_data: [value_length -
                  nfc$fixed_q_status_data_length] IN
                  log_file_seq.sequence_pointer;
            display_q_status_data (q_status_data^, display_control, status);
          FOREND;

        = nfc$device_type_count =
          NEXT count IN log_file_seq.sequence_pointer;
          device_types_count := count^;
          clp$convert_integer_to_string (count^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Device Type Count',
                display_control, status);

        = nfc$device_types_and_files =
          FOR i := 1 TO device_types_count DO
            NEXT q_status_data: [value_length -
                  nfc$fixed_q_status_data_length] IN
                  log_file_seq.sequence_pointer;
            display_q_status_data (q_status_data^, display_control, status);
          FOREND;

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND queue_status_data_msg;
?? TITLE := '    select file msg', EJECT ??

    PROCEDURE select_file_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$select_file_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$select_file_parameter,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$system_file_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    System File Name',
                display_control, status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND select_file_msg;
?? TITLE := '    select file response msg', EJECT ??

    PROCEDURE select_file_response_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$select_file_response_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$select_file_resp_parameter,
        response: string (39),
        response_code: ^nft$select_file_response,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$system_file_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    System File Name',
                display_control, status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$self_msg_accepted =
            response := 'Message Accepted';
          = nfc$self_msg_unknown_ios =
            response := 'Message Rejected, no io station';
          = nfc$self_msg_unknown_device =
            response := 'Message Rejected, no device';
          = nfc$self_msg_unknown_file =
            response := 'Message Rejected, no file';
          = nfc$self_file_already_printing =
            response := 'Message Rejected, file already printing';
          = nfc$self_wrong_device_type =
            response := 'Message Rejected, wrong device type';
          = nfc$self_duplicate_file_name =
            response := 'Message Rejected, file must be unique';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND select_file_response_msg;
?? TITLE := '    send ntf remote command', EJECT ??

    PROCEDURE send_ntf_remote_command
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$ntf_send_remote_comm_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        command_kind: ^nft$ntf_command_kind,
        command_text: ^string ( * <= nfc$ntf_max_command_text_size),
        error: ost$error,
        line_number: ^nft$ntf_logical_line_number,
        msg_length: integer,
        parameter: ^nft$ntf_send_remote_comm_msg,
        str: ost$string,
        text: ^string ( * <= nfc$ntf_max_command_text_size),
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$ntf_remote_system_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Remote System', display_control,
                status);

        = nfc$ntf_console_stream_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Remote System', display_control,
                status);

        = nfc$ntf_logical_line_number =
          NEXT line_number IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (line_number^, 10, FALSE, str, status);
          put_display_line (str.value (1, str.size), '    Logical Line Number',
                display_control, status);

        = nfc$ntf_command_kind =
          NEXT command_kind IN log_file_seq.sequence_pointer;
          put_display_line (command_kinds[command_kind^], '    Command Kind',
                display_control, status);

        = nfc$ntf_command_text =
          NEXT command_text: [value_length] IN log_file_seq.sequence_pointer;
          PUSH text: [value_length];
          osp$translate_bytes (command_text, value_length, text, value_length,
                ^osv$ebcdic_to_ascii, error);
{         put_display_line (text^, '    Command Text', display_control, status);
          put_display_line ('*EBCDIC Codes*', '    Command Text', display_control, status);

        = nfc$ntf_system_identifier =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    System ID', display_control,
                status);

        = nfc$ntf_family_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Family Name', display_control,
                status);

        = nfc$ntf_user_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    User Name', display_control,
                status);

        = nfc$ntf_operator_identifier =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    NTF Operator ID', display_control,
                status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND send_ntf_remote_command;
?? TITLE := '    send ntf remote command resp', EJECT ??

    PROCEDURE send_ntf_remote_command_resp
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$ntf_send_remote_comm_resp
*copyc nft$ntf_send_rc_response_codes

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        command_kind: ^nft$ntf_command_kind,
        msg_length: integer,
        parameter: ^nft$ntf_send_remote_comm_resp,
        response: string (39),
        response_code: ^nft$ntf_send_rc_response_codes,
        signon_status: ^nft$device_status,
        str: ost$string,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$ntf_remote_system_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Remote System', display_control,
                status);

        = nfc$ntf_console_stream_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Remote System', display_control,
                status);

        = nfc$ntf_command_kind =
          NEXT command_kind IN log_file_seq.sequence_pointer;
          put_display_line (command_kinds[command_kind^], '    Command Kind',
                display_control, status);

        = nfc$ntf_signon_status =
          NEXT signon_status IN log_file_seq.sequence_pointer;
          put_display_line (device_statuses [signon_status^],
                '    Signon Status', display_control, status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$message_accepted =
            response := 'Message Accepted';
          = nfc$ntf_incorrect_signon_status =
            response := 'Message Rejected, incorrect signon status';
          = nfc$ntf_remote_system_not_found =
            response := 'Message Rejected, Remote System not found';
          = nfc$ntf_batch_stream_not_found =
            response := 'Message Rejected, no Batch Stream';
          = nfc$ntf_client_not_found =
            response := 'Message Rejected, no client';
          = nfc$ntf_no_users_found =
            response := 'Message Rejected, no users';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND send_ntf_remote_command_resp;
?? TITLE := '    start batch device msg', EJECT ??

    PROCEDURE start_batch_device_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$start_batch_device_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$start_bd_message_parameter,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND start_batch_device_msg;
?? TITLE := '    start io station msg', EJECT ??

    PROCEDURE start_io_station_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$start_io_station_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$start_ios_message_parameter,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$user_identity =
          NEXT ascii_string: [osc$max_name_size] IN
                log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    User', display_control,
                status);
          NEXT ascii_string: [osc$max_name_size] IN
                log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Family', display_control,
                status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND start_io_station_msg;
?? TITLE := '    station status data msg', EJECT ??

    PROCEDURE station_status_data_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$station_status_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        destination_unavail_action: ^nft$destination_unavail_actions,
        device_count: ^integer,
        device_status_data: ^nft$device_status_data,
        file_ack: ^boolean,
        fixed_size: integer,
        io_station_usage: ^nft$io_station_usage,
        msg_length: integer,
        parameter: ^nft$station_status_msg_param,
        pm_message_action: ^nft$pm_message_actions,
        q_file_count: ^integer,
        response: string (33),
        response_code: ^nft$display_status_resp_codes,
        str: ost$string,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$response_code =
          NEXT response_code IN log_file_seq.sequence_pointer;
          CASE response_code^ OF
          = nfc$disp_msg_accepted =
            response := 'Message Accepted';
          = nfc$disp_no_io_station =
            response := 'Message Rejected, no io station';
          = nfc$disp_no_batch_device =
            response := 'Message Rejected, no batch device';
          = nfc$disp_unknown_file_name =
            response := 'Message Rejected, unknown file';
          CASEND;
          put_display_line (response, '    Response', display_control, status);

        = nfc$control_facility =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Control Facility',
                display_control, status);

        = nfc$number_of_files_queued =
          ;
          NEXT q_file_count IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (q_file_count^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size),
                '    Number of Files Queued', display_control, status);

        = nfc$station_usage =
          NEXT io_station_usage IN log_file_seq.sequence_pointer;
          put_display_line (station_usages [io_station_usage^],
                '    Station_Usage', display_control, status);

        = nfc$file_acknowledgement =
          NEXT file_ack IN log_file_seq.sequence_pointer;
          put_display_line (boolean_values [file_ack^],
                '    File Acknowledgement', display_control, status);

        = nfc$count_of_devices =
          NEXT device_count IN log_file_seq.sequence_pointer;
          clp$convert_integer_to_string (device_count^, 10, FALSE, str,
                status);
          put_display_line (str.value (1, str.size), '    Number of Devices',
                display_control, status);

        = nfc$device_name_status =
          fixed_size := #SIZE (nft$device_status) +
                #SIZE (nft$file_transfer_status) + #SIZE (nft$device_type);
          NEXT device_status_data: [value_length - fixed_size] IN
                log_file_seq.sequence_pointer;
          put_display_line (device_statuses [device_status_data^.
                device_status], '    Device Status', display_control, status);
          put_display_line (device_types [device_status_data^.device_type],
                '    Device Type', display_control, status);
          put_display_line (file_transfer_statuses
                [device_status_data^.file_xfer_status],
                '    File Transfer Status', display_control, status);
          put_display_line (device_status_data^.name, '    Device',
                display_control, status);

        = nfc$req_console_device =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Required Operator Device',
                display_control, status);

        = nfc$io_station_alias_1 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station Alias 1',
                display_control, status);

        = nfc$io_station_alias_2 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station Alias 2',
                display_control, status);

        = nfc$io_station_alias_3 =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station Alias 3',
                display_control, status);

        = nfc$destination_unavail_action =
          NEXT destination_unavail_action IN log_file_seq.sequence_pointer;
          put_display_line (destination_unavail_actions
                [destination_unavail_action^], '    Dest Unavail Action',
                display_control, status);

        = nfc$pm_message_action =
          NEXT pm_message_action IN log_file_seq.sequence_pointer;
          put_display_line (pm_message_actions [pm_message_action^],
                '    PM Message Action', display_control, status);
        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND station_status_data_msg;
?? TITLE := '    stop batch device msg', EJECT ??

    PROCEDURE stop_batch_device_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$stop_batch_device_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        disposition: ^nft$file_disposition,
        msg_length: integer,
        parameter: ^nft$stop_bd_message_parameter,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$file_disposition =
          NEXT disposition IN log_file_seq.sequence_pointer;
          put_display_line (file_dispositions [disposition^],
                '    File Disposition', display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND stop_batch_device_msg;
?? TITLE := '    stop io station msg', EJECT ??

    PROCEDURE stop_io_station_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$stop_io_station_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$stop_ios_message_parameter,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND stop_io_station_msg;
?? TITLE := '    suppress carriage control msg', EJECT ??

    PROCEDURE suppress_carriage_control_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$suppress_carriage_cntrl_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        format_control: ^nft$suppress_carriage_control,
        msg_length: integer,
        parameter: ^nft$suppress_cc_msg_parameter,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$suppress_format_control =
          NEXT format_control IN log_file_seq.sequence_pointer;

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN
                log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND suppress_carriage_control_msg;
?? TITLE := '    terminate_queue_output_msg', EJECT ??

    PROCEDURE terminate_queue_output_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$terminate_queued_output_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        msg_length: integer,
        parameter: ^nft$term_queue_output_parameter,
        value_length: integer;

      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (msg_length > 0) AND (parameter^.param <> nfc$null_parameter) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length, status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control, status);

        = nfc$system_user_file_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    System/User File Name',  display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        ELSEIF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND terminate_queue_output_msg;
?? TITLE := '    terminate_queue_output_resp_msg', EJECT ??

    PROCEDURE terminate_queue_output_resp_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$terminate_q_output_resp_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        file_status_code: ^nft$terqo_file_status_codes,
        msg_length: integer,
        parameter: ^nft$term_q_output_resp_param,
        response: ^nft$terqo_file_status_codes,
        value_length: integer;

      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (msg_length > 0) AND (parameter^.param <> nfc$null_parameter) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control, status);

        = nfc$system_user_file_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    System/User File Name', display_control, status);

        = nfc$file_status_code =
          NEXT file_status_code IN log_file_seq.sequence_pointer;
          put_display_line (terqo_file_status_codes [file_status_code^], '    File_Status_Code',
              display_control, status);

        ELSE

{         ERROR

          NEXT byte_array: [1 .. value_length] IN log_file_seq.sequence_pointer;

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        ELSEIF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND terminate_queue_output_resp_msg;
?? TITLE := '    terminate transfer msg', EJECT ??

    PROCEDURE terminate_transfer_msg
      (    message_length: integer;
       VAR display_control: clt$display_control;
       VAR log_file_seq: amt$segment_pointer;
       VAR status: ost$status);

*copyc nft$terminate_transfer_msg

      VAR
        ascii_string: ^string ( * <= osc$max_name_size),
        disposition: ^nft$file_disposition,
        msg_length: integer,
        parameter: ^nft$terminate_xfer_msg_param,
        value_length: integer;


      msg_length := message_length - 1;
      NEXT parameter IN log_file_seq.sequence_pointer;

      WHILE (parameter <> NIL) AND (parameter^.param <> nfc$null_parameter) AND
            (msg_length > 0) DO
        msg_length := msg_length - 1;
        IF parameter^.length_indicated THEN
          get_parameter_value_length (log_file_seq, msg_length, value_length,
                status);
          msg_length := msg_length - value_length;
        ELSE
          value_length := 1;
          msg_length := msg_length - 1;
        IFEND;

        CASE parameter^.param OF
        = nfc$io_station_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Station', display_control,
                status);

        = nfc$device_name =
          NEXT ascii_string: [value_length] IN log_file_seq.sequence_pointer;
          put_display_line (ascii_string^, '    Device', display_control,
                status);

        = nfc$file_disposition =
          NEXT disposition IN log_file_seq.sequence_pointer;
          put_display_line (file_dispositions [disposition^],
                '    File Disposition', display_control, status);

        ELSE

{         ERROR

        CASEND;
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        IF msg_length > 0 THEN
          NEXT parameter IN log_file_seq.sequence_pointer;
        IFEND;
      WHILEND;

    PROCEND terminate_transfer_msg;
?? OLDTITLE, EJECT ??

    CONST
      ntf_operator = 'NTF Operator Connection',
      ntf_ve = 'NTF/VE Connection',
      operator = 'Operator Connection',
      scf_di = 'SCF/DI Connection',
      scf_ve = 'SCF/VE Connection',
      scfs_ve = 'SCFS Connection',
      unknown = 'Unknown Connection';

    VAR
      address: ^nft$connection_address,
      array_length: ^integer,
      byte_array: ^array [1 .. * ] of 0 .. 0ff(16),
      connect_msg: string (40),
      connection_kind: ^nft$connection_kind,
      log_time: ^ost$time,
      message_kind: ^nft$message_kind,
      msg_length: integer,
      xns_address: ^nft$network_address;


    NEXT connection_kind IN log_file_seq.sequence_pointer;
    IF pvt [p$format].value^.keyword_value = 'R131' THEN
      NEXT xns_address IN log_file_seq.sequence_pointer;
      PUSH address;
      address^.kind := nac$internet_address;
      address^.internet_address := xns_address^;
    ELSE
      NEXT address IN log_file_seq.sequence_pointer;
    IFEND;
    NEXT log_time IN log_file_seq.sequence_pointer;
    NEXT array_length IN log_file_seq.sequence_pointer;
    NEXT message_kind IN log_file_seq.sequence_pointer;

    CASE connection_kind^ OF
    = nfc$unknown_connection =
      connect_msg := unknown;
    = nfc$scfdi_connection =
      connect_msg := scf_di;
    = nfc$scfve_connection =
      connect_msg := scf_ve;
    = nfc$operator_connection =
      connect_msg := operator;
    = nfc$scfsve_connection =
      connect_msg := scfs_ve;
    = nfc$ntfve_connection =
      connect_msg := ntf_ve;
    = nfc$ntf_operator_connection =
      connect_msg := ntf_operator;
    CASEND;

    IF pvt [p$display_option].value^.keyword_value = 'BRIEF' THEN
      CASE message_kind^ OF
      = nfc$device_status_data,
        nfc$get_device_status,
        nfc$get_queue_entry,
        nfc$get_queue_entry_list,
        nfc$get_queue_status,
        nfc$get_station_status,
        nfc$queue_entry_data,
        nfc$queue_entry_list_data,
        nfc$queue_status_data,
        nfc$station_status_data =
        display_message := FALSE;
      ELSE
        display_message := TRUE;
      CASEND;
    ELSE
      display_message := TRUE;
    IFEND;

    IF display_message THEN
      clp$put_display (display_control, log_time^.millisecond, clc$no_trim, status);
      display_connection_address (connect_msg, address, display_control, status);
      clp$put_partial_display (display_control, message_kind_str [message_kind^], clc$trim,
            amc$start, status);
      clp$put_partial_display (display_control, ' Message', clc$no_trim, amc$terminate, status);
    IFEND;

    CASE message_kind^ OF
    = nfc$add_file_availability, nfc$modify_file_availability,
          nfc$delete_file_availability =
      display_file_availability_msg (array_length^, display_control,
            log_file_seq, status);

    = nfc$file_assignment =
      file_assignment_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$file_assignment_response =
      file_assignment_response_msg (array_length^, display_control,
            log_file_seq, status);

    = nfc$delete_destination =
      delete_destination_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$btf_ve_status =
      btf_ve_status_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$add_io_station =
      add_io_station_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$delete_io_station =
      delete_io_station_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$add_batch_device =
      add_batch_device_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$batch_device_status =
      batch_device_status_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$file_transfer_status =
      file_transfer_status_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$delete_batch_device =
      delete_batch_device_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$btfs_di_status =
      btfs_di_status_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$add_io_station_resp =
      add_io_station_resp_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$delete_io_station_resp =
      delete_io_station_resp_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$start_io_station =
      start_io_station_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$stop_io_station =
      stop_io_station_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$switch_io_station =
      ;

    = nfc$position_file_di =
      position_file_msg_to_di (array_length^, display_control, log_file_seq,
            status);

    = nfc$add_batch_device_resp =
      add_batch_device_resp_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$delete_batch_device_resp =
      delete_batch_device_resp_msg (array_length^, display_control,
            log_file_seq, status);

    = nfc$start_batch_device =
      start_batch_device_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$stop_batch_device =
      stop_batch_device_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$suppress_carriage_control =
      suppress_carriage_control_msg (array_length^, display_control,
            log_file_seq, status);

    = nfc$terminate_transfer =
      terminate_transfer_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$change_batch_device_attr =
      change_batch_device_attributes (array_length^, display_control,
            log_file_seq, status);

    = nfc$change_bat_device_attr_resp, nfc$start_batch_device_resp,
          nfc$stop_batch_device_resp, nfc$terminate_transfer_resp,
          nfc$position_file_resp, nfc$suppress_carriage_cntrl_rsp =
      msg_length := array_length^;
      device_control_resp_msg (msg_length, display_control, log_file_seq,
            status);
      IF message_kind^ = nfc$change_bat_device_attr_resp THEN
        change_batch_device_attr_resp (msg_length, display_control,
              log_file_seq, status);
      IFEND;

    = nfc$switch_control_facility =
      ;

    = nfc$operator_message =
      operator_message (array_length^, display_control, log_file_seq, status);

    = nfc$add_user =
      add_user_msg (array_length^, display_control, log_file_seq, status);

    = nfc$add_user_resp =
      add_user_resp_msg (array_length^, display_control, log_file_seq, status);

    = nfc$select_file =
      select_file_msg (array_length^, display_control, log_file_seq, status);

    = nfc$select_file_response =
      select_file_response_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$position_file_sou =
      position_file_msg (array_length^, display_control, log_file_seq, status);

    = nfc$get_station_status =
      get_station_status_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$station_status_data =
      station_status_data_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$get_device_status =
      get_device_status_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$device_status_data =
      device_status_data_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$get_queue_status =
      get_queue_status_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$queue_status_data =
      queue_status_data_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$get_queue_entry_list =
      get_queue_entry_list_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$queue_entry_list_data =
      queue_entry_list_data_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$get_queue_entry =
      get_queue_entry_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$queue_entry_data =
      queue_entry_data_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$add_ntf_acc_rem_sys_resp =
      add_acc_remote_system_resp_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$get_ntf_rem_sys_names_msg =
      get_ntf_remote_system_names_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$get_ntf_rem_sys_names_data =
      get_ntf_rem_sys_names_data (array_length^, display_control, log_file_seq,
            status);

    = nfc$get_ntf_rem_sys_opts_msg =
      ntf_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$get_ntf_rem_sys_opts_data =
      ntf_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$send_ntf_remote_comm_msg =
      send_ntf_remote_command (array_length^, display_control, log_file_seq, status);

    = nfc$send_ntf_remote_comm_resp =
      send_ntf_remote_command_resp (array_length^, display_control, log_file_seq, status);

    = nfc$get_ntf_rem_sys_stat_msg =
      ntf_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$get_ntf_rem_sys_stat_data =
      ntf_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$add_ntf_remote_sys_msg =
      add_remote_system_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$add_ntf_acc_rem_sys_msg =
      add_accessible_remote_sys_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$delete_ntf_remote_sys_msg =
      ntf_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$add_ntf_remote_sys_resp =
      add_remote_system_resp_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$delete_ntf_remote_sys_resp =
      ntf_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$delete_ntf_user_msg =
      ntf_msg (array_length^, display_control, log_file_seq,
            status);

    = nfc$delete_ntf_user_resp =
      delete_ntf_user_response (array_length^, display_control, log_file_seq,
            status);

    = nfc$terminate_queue_output =
      terminate_queue_output_msg (array_length^, display_control, log_file_seq, status);

    = nfc$terminate_queue_output_resp =
      terminate_queue_output_resp_msg (array_length^, display_control, log_file_seq, status);

    ELSE
      ;
    CASEND;

  PROCEND display_connection_message;
?? TITLE := '  display scfs log', EJECT ??

  PROCEDURE display_scfs_log
    (VAR display_control: clt$display_control;
     VAR log_file_seq: amt$segment_pointer;
     VAR status: ost$status);

    CONST
      accepted = 'ACC',
      msg = 'MSG',
      ntf_operator = 'NTF Operator Connection',
      ntf_ve = 'NTF/VE Connection',
      operator = 'Operator Connection',
      scf_di = 'SCF/DI Connection',
      scf_ve = 'SCF/VE Connection',
      scfs_ve = 'SCFS Connection',
      rejected = 'REJ',
      terminated = 'TER',
      unknown = 'Unknown Connection';

    VAR
      address: ^nft$connection_address,
      connect_kind_str: string(25),
      connection_kind: ^nft$connection_kind,
      connection_label: ost$name,
      log_entry: ^string (3),
      log_date: ^ost$date,
      log_time: ^ost$time,
      put_blank_status: ost$status,
      size: integer,
      time_stamp: string (30),
      xns_address: ^nft$network_address;

    RESET log_file_seq.sequence_pointer;
    NEXT log_entry IN log_file_seq.sequence_pointer;
    WHILE log_entry <> NIL DO
      IF (log_entry^ = accepted) OR (log_entry^ = rejected) OR
            (log_entry^ = terminated) THEN
        IF log_entry^ = accepted THEN
          connection_label := '  Connection Accepted'
        ELSEIF log_entry^ = rejected THEN
          connection_label := '  Connection Rejected'
        ELSEIF log_entry^ = terminated THEN
          connection_label := '  Connection Terminated'
        IFEND;
        IF (pvt [p$format].value^.keyword_value <> 'R131') AND
              (pvt [p$format].value^.keyword_value <> 'R141') THEN
          NEXT connection_kind IN log_file_seq.sequence_pointer;
          CASE connection_kind^ OF
          = nfc$unknown_connection =
            connect_kind_str := unknown;
          = nfc$scfdi_connection =
            connect_kind_str := scf_di;
          = nfc$scfve_connection =
            connect_kind_str := scf_ve;
          = nfc$operator_connection =
            connect_kind_str := operator;
          = nfc$scfsve_connection =
            connect_kind_str := scfs_ve;
          = nfc$ntfve_connection =
            connect_kind_str := ntf_ve;
          = nfc$ntf_operator_connection =
            connect_kind_str := ntf_operator;
          CASEND;
        IFEND;
        IF pvt [p$format].value^.keyword_value = 'R131' THEN
          NEXT xns_address IN log_file_seq.sequence_pointer;
          PUSH address;
          address^.kind := nac$internet_address;
          address^.internet_address := xns_address^;
        ELSE
          NEXT address IN log_file_seq.sequence_pointer;
        IFEND;
        NEXT log_time IN log_file_seq.sequence_pointer;
        IF (log_entry^ = accepted) AND (pvt [p$format].value^.keyword_value <> 'R131') AND
              (pvt [p$format].value^.keyword_value <> 'R141') THEN
          NEXT log_date IN log_file_seq.sequence_pointer;
          STRINGREP (time_stamp, size, log_time^.millisecond, ' / ', log_date^.iso);
        ELSE
          time_stamp := log_time^.millisecond;
          size := 12;
        IFEND;

        clp$put_display (display_control, time_stamp (1, size), clc$no_trim, status);
        IF (pvt [p$format].value^.keyword_value <> 'R131') AND
              (pvt [p$format].value^.keyword_value <> 'R141') THEN
          display_connection_address (connect_kind_str, address, display_control, status);
          clp$put_display (display_control, connection_label, clc$no_trim, status);
        ELSE
          display_connection_address (connection_label, address, display_control, status);
        IFEND;
        put_display_line (' ', ' ', display_control, put_blank_status);
      ELSEIF log_entry^ = msg THEN
        display_connection_message (display_control, log_file_seq, status);
        put_display_line (' ', ' ', display_control, put_blank_status);
      IFEND;
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;
      NEXT log_entry IN log_file_seq.sequence_pointer;
    WHILEND;

  PROCEND display_scfs_log;
?? TITLE := '  get parameter value length', EJECT ??

  PROCEDURE get_parameter_value_length
    (VAR log_file_seq: amt$segment_pointer;
     VAR msg_length: integer;
     VAR parameter_value_length: integer;
     VAR status: ost$status);

    VAR
      i: integer,
      length_bytes: ^array [1 .. * ] of 0 .. 0ff(16),
      parameter_length: ^nft$parameter_value_length;


    NEXT parameter_length IN log_file_seq.sequence_pointer;
    msg_length := msg_length - 1;
    IF NOT parameter_length^.long_length THEN
      parameter_value_length := parameter_length^.length;
    ELSE
      NEXT length_bytes: [1 .. parameter_length^.length] IN
            log_file_seq.sequence_pointer;
      parameter_value_length := 0;
      FOR i := 1 TO parameter_length^.length DO
        parameter_value_length := parameter_value_length *
              100(16) + length_bytes^ [i];
      FOREND;
      msg_length := msg_length - parameter_length^.length;
    IFEND;

  PROCEND get_parameter_value_length;
?? TITLE := '  put display line', EJECT ??

  PROCEDURE put_display_line
    (    line: string ( * );
         label: string ( * );
     VAR display_control: clt$display_control;
     VAR status: ost$status);

    VAR
      label_str: string (label_size);

    status.normal := TRUE;

    IF NOT display_message THEN
      RETURN;
    IFEND;

    label_str := label;
    IF label <> ' ' THEN
      label_str (label_size - 2, 3) := ' : ';
    IFEND;

    clp$put_partial_display (display_control, label_str, clc$no_trim,
          amc$start, status);
    IF status.normal THEN
      clp$put_partial_display (display_control, line, clc$trim, amc$terminate,
            status);
    IFEND;

  PROCEND put_display_line;
?? TITLE := '  nfp$display scfs log', EJECT ??

  PROGRAM nfp$display_scfs_log
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

*copy clv$display_variables
?? NEWTITLE := '    clean_up', EJECT ??

    PROCEDURE clean_up;

      VAR
        close_status: ost$status,
        ignore_status: ost$status;

      IF output_open THEN
        clp$close_display (display_control, close_status);
      IFEND;
      IF log_open THEN
        fsp$close_file (log_file_id, status);
        amp$return (log_file, ignore_status);
      IFEND;

    PROCEND clean_up;
*copy clp$new_page_procedure
?? TITLE := '  exit condition handler', EJECT ??

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

      VAR
        local_status: ost$status;

    PROCEND exit_condition_handler;
?? TITLE := '    put_subtitle', EJECT ??

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

      {The display_log command has no subtitles,
      { this is merely a dummy routine used to keep
      { the module consistent with those that do produce subtitles.

    PROCEND put_subtitle;
?? OLDTITLE, EJECT ??

    VAR
      container: clt$path_container,
      cycle_selector: clt$cycle_selector,
      display_control: clt$display_control,
      establish_descriptor: pmt$established_handler,
      exit_condition: [STATIC, READ] pmt$condition :=
            [pmc$block_exit_processing, [pmc$block_exit,
            pmc$program_termination, pmc$program_abort]],
      log_file: amt$local_file_name,
      log_file_attachment_options: ^fst$attachment_options,
      log_file_id: amt$file_identifier,
      log_file_ref: fst$evaluated_file_reference,
      log_file_seq: amt$segment_pointer,
      log_open: boolean,
      open_position: clt$open_position,
      output_file: clt$file,
      output_file_ref: fst$evaluated_file_reference,
      output_open: boolean;

    status.normal := TRUE;
    display_message := TRUE;
    output_open := FALSE;

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

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

    clp$convert_str_to_path_handle (pvt [p$output].value^.file_value^,
          FALSE, TRUE, TRUE, output_file.local_file_name, output_file_ref,
          status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;
    clp$open_display (output_file, ^clp$new_page_procedure,
          display_control, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;
    output_open := TRUE;
    clv$titles_built := FALSE;
    clv$command_name := 'display_scfs_log';

    clp$convert_str_to_path_handle (pvt [p$log_file].value^.file_value^,
          FALSE, TRUE, TRUE, log_file, log_file_ref, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    PUSH log_file_attachment_options: [1 .. 2];
    log_file_attachment_options^ [1].selector := fsc$access_and_share_modes;
    log_file_attachment_options^ [1].access_modes.selector :=
          fsc$specific_access_modes;
    log_file_attachment_options^ [1].access_modes.value :=
          $fst$file_access_options [fsc$read];
    log_file_attachment_options^ [1].share_modes.selector :=
          fsc$specific_share_modes;
    log_file_attachment_options^ [1].share_modes.value :=
          -$fst$file_access_options [];
    log_file_attachment_options^ [2].selector := fsc$create_file;
    log_file_attachment_options^ [2].create_file := FALSE;

    fsp$open_file (log_file, amc$segment, log_file_attachment_options, NIL, NIL, NIL,
          NIL, log_file_id, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;
    log_open := TRUE;
    amp$get_segment_pointer (log_file_id, amc$sequence_pointer, log_file_seq,
          status);

    display_scfs_log (display_control, log_file_seq, status);

    clean_up;

  PROCEND nfp$display_scfs_log;
MODEND nfm$display_scfs_log;
