Unexpected ";" in Korn shell script w/case stmnt

I am getting an unexpected ";" in a Korn shell script to be run on an AIX server.  Here is the code that is giving me trouble:

read answer
echo
case $answer in
1 )
   echo 'This script is designed to be run prior to processing'
   echo 'iforms for a given database.  It deletes any existing'
   echo 'iform files in order to prevent duplication of claims.'
   echo
   echo 'Enter the PCN office number to prep for iforms: '
   read offnum
   cd /u2/office$offnum/archive
   pwd
   ls -l |grep iforms.*
   ls -l |grep hcfa.dat
   if [ -a iforms.* ] ; then
     rm -i iforms.*
   else if [ -a hcfa.dat ] ; then
     rm -i hcfa.dat  
   else
     echo 'No iform files were found. Go ahead and run iforms.'
   fi
 hold ;;
2 )

The line with the "hold ;;" is giving me the error.  Hold is a function used pause between menu items echoed above.  I have modeled this case statement after others that run on this system.  If I take out the function call I still get the error.  I get the error with one or two ";".  I am using the if statements in a seperate script successfully. Any suggestions????
TREKAsked:
Who is Participating?
 
ozoConnect With a Mentor Commented:
elif [ -a hcfa.dat ] ; then
0
 
TREKAuthor Commented:
Adjusted points to 10
0
 
TREKAuthor Commented:
Thanks for your help.
0
 
ozoCommented:
You could also fix it by adding another fi to balance the extra if
0
All Courses

From novice to tech pro — start learning today.