PROCEDURE prompt_for_add_element (
  physical_data: string = $optional
  system_id: (var) string = $optional
  add_this_element: (var) string = $optional
  )

  create_variable choice kind=string v=''

  main_loop: ..
    loop

 put_line ' '
 put_line '0Would you like to add element  '//$trim($substring(physical_data,11,31))//' to the network?'
 put_line ' Enter YES, NO, QUIT, or ?: '
 accept_line choice input p=''

 IF (choice='?') OR ($translate(lower_to_upper,choice)='HELP') THEN
   put_line ('0Enter YES if this element is to be added to the network configuration. ' ..
             ' Enter NO if this element is NOT to be added to the network configuration. ')
   accept_line choice input p='Press NEXT:'
 ELSEIF ($translate(lower_to_upper,choice)='QUIT') OR ($translate(lower_to_upper,choice)='QUI') THEN
     EXIT main_loop
 ELSEIF ($translate(lower_to_upper,choice)='YES') OR ($translate(lower_to_upper,choice)='Y') THEN
    add_this_element = 'YES'
    IF physical_data(5,5)='ICA2 ' THEN
      prompt_for_system_id ICA2 system_id
    IFEND
    EXIT main_loop
 ELSEIF ($translate(lower_to_upper,choice)='NO') OR ($translate(lower_to_upper,choice)='N') THEN
    add_this_element = ' '
    system_id = ' '
    EXIT main_loop
 IFEND
 LOOPEND main_loop

PROCEND prompt_for_add_element
