remsh inside of while loop

I have a space delimited file containing: hostname OracleSID connectstring
I want to loop through the file and execute remsh to check the database processes.

cat $filename | while read HOST SID CONNECT
do
{
result=`remsh $HOST "ps -ef | grep pmon_${SID}$| grep -v grep"`
if ..... then.... fi
}
done
I can execute a variety of commands within the loop, but the second I add the "result=`remsh...`... the loop will only execute 1 time for the first entry in the file. Then it stops. no error, but the loop is done. Please help.

sorry. I found the answer to my own issue from my friendly neighborhood Windows (soon to be Linux convert) admin... The remsh command uses stdin which is being used by the read command. The "-n" option of the remsh command redirects its input. so the corrected command is:
result=`remsh $HOST -n "ps -ef| ...."`

thanks for your tolerance.