I like Jochens idea, but here's the other way of doing it ...you decide:

break on

? "Enter the three Digit Machine ID (eg 601): "

$done = 0
$ans = ""

do
 get $c
 if asc($c) = 3 ; ^c break ?
  $done = 1
 else
  if $c <> " "
   $c = ucase($c)
   $c ; echo
   $ans = $ans + $c
  else
   beep
  endif
 endif
until $done or len($ans) = 3

exit 1


-Shawn