PROCEDURE prompt_for_tcpip_host_name (
  host_name : (var) string = $required
  status)

  VAR
    input_string: string
  VAREND

tcpip_host_name_loop: ..
  LOOP
    put_line (..
      '0Enter the TCP/IP host name, GO, QUIT, or ? for help.')
    accept_line input_string input p=''
    IF (input_string = '?') OR ($translate(lower_to_upper, input_string) = 'HELP') THEN
        put_line (..
          '0Specify the TCP/IP host name. '..
          ' The Host Name (also known as the domain name) is a' ..
          ' string of 255 characters or less.  The domain name may be subdivided into ' ..
          ' domain labels.  Domain labels may be up to 63 characters in length. ' ..
          ' Domain labels are seperated with periods.  Domain labels must begin ' ..
          ' with a letter (a..z or A..Z) and may be followed with 0 to 62 more ' ..
          ' letters, digits (0..9), hyphens (-), or underscores (_) with the exception ' ..
          ' of the last character which must be either a letter or a digit. ' ..
          ' For example, arh.cdc.q---_5 is a valid host name. ' ..
          ' Enter GO or press NEXT to the retain the current TCP/IP host name of "'//host_name//'".' ..
          ' Enter QUIT to return to the Define TCP/IP Host menu without defining ' ..
          ' the TCP/IP Host Name.' ..
          '  ')
    ELSEIF ($translate(lower_to_upper, input_string) = 'QUIT') OR ($translate(lower_to_upper, input_string) = 'QUI') ..
          THEN
      host_name = ' '
      EXIT tcpip_host_name_loop
    ELSEIF ($translate(lower_to_upper, input_string) = 'GO') OR ($translate(lower_to_upper, input_string) = ' ') THEN
      EXIT tcpip_host_name_loop
    ELSE
      host_name = input_string
      EXIT tcpip_host_name_loop
    IFEND
  LOOPEND tcpip_host_name_loop

PROCEND prompt_for_tcpip_host_name
