need help with using input file in the while loop

here's my code:

ls -lt | /usr/bin/egrep `date +"%Y%m%d(05|06|07|08|09|10|11|12|13|14|15|16|17|18|19)"` | \
/usr/bin/egrep -i .dat | /usr/bin/awk '{print $9}' > $LockboxFile1

if [[ -s $LockboxFile1]]
then
echo " "
echo "Files in the archived directory: "
cat $LockboxFile1 |
while read line
do
grep -l CHK $line >> $LockboxFile2
done
fi

it's erroring out, would anyone know why it's not working?

ls -lt | /usr/bin/egrep `date +"%Y%m%d(05|06|07|08|09|10|11|12|13|14|15|16|17|18|19)"` | \
/usr/bin/egrep -i .dat | /usr/bin/awk '{print $9}' > $LockboxFile1

cat $LockboxFile1 | while read line
do
grep -l CHK $line
done >> $LockboxFile2

it's giving me an error: done unexpected

cat $LockboxFile1 | while read line
do
grep -l CHK $line
:
done >> $LockboxFile2

it's giving me an error: done unexpected

-- but i tried to run this in unix and it returned the output I am expecting, it's just not working when i add and run in the ksh script i am working on

Try

while read line 
do 
grep -l CHK $line >> $LockboxFile2 
:
done < $LockboxFile1