`for' unmatched

:b:Hi guys,
I am getting this error in this piece of code, Any help will be appreciate

rypidoc.shl[79]: syntax error at line 79 : `for' unmatched

##Determine if there is a file to process
ls 3526*.dat > /dev/null 2>&1
if [ $? != 0 ]
then
exit
fi
for i in 3526*.dat
do

# Capture just the file sequence number
fseqno=`print $i | sed 's/.*_//' | sed 's/.dat//' `
cd "${MPATH}/middlebury/dat_files"
echo $i `date` > idochd1.lst
cp $i idoc.dat
cp $i finaid.idoc

Looks like you're missing the done to end the for loop:

for
do
code
done

Got it
Thank you!