Can some review my code would be appreicated?

I am getting an error "ftpNotes.sh[11]: syntax error at line 8 : `<<' unmatched"

#!/bin/ksh
PATH=/usr/sbin/:/usr/bin:/usr/ucb:/etc:/usr/local/bin:.
cd $HOME
if [ -e CRM_DSC_XML ];then 
		    if [ -e ftpDSC$DATE.flg ]; then 
					     echo 'DSC file already ftp to epm server'
		    else
		            ftp -n epmdev00 <<SCRIPT
			user $USER $PASSWD
			binary
			prompt off
		          cd /export/home/dsadm/EPM_INTERFACE/TAS/RCDD
			put CRM_DSC.XML 
			quit
			SCRIPT
			(
    			sleep 3
    			print $USER
    			sleep 1
    			print $PASSWD
    			sleep 2
    			print "cd $ HOME"
    			print "ls -la CRM_DSC.XML >$CHECK" 	
    			sleep  10
    			print "exit"
    			sleep 3
    			) | telnet epmdev00
		ERROR=`grep -i -c 'No such file or directory' $CHECK`

		if [ $ERROR = 1 ]; then 
		echo " FTP for DSC file! Failed -- `date +%H:%M`"

			else
			echo 'DSC file has been ftp to epm server'
			touch ftpDSC$DATE.flg
			rm -f CRM_DSC.XML
			fi
		    fi	
else
echo 'didn't get the DSC file this week or already ftp to epm server' 
fi
exit

if i am doing something worng can someone help me please.

Thanks in Advance

From the ksh man page:

<<[-]word     The shell input is read up to a line that matches word, or to an end-of-file.  No parameter 
              substitution, command substitution, or file name generation is performed on word.  The resulting 
              document, called a here-document, becomes the standard input.  If any character of word is quoted, 
              no interpretation is placed upon the characters of the document.  Otherwise, parameter and command 
              substitution occurs, \new-line is ignored, and \ must be used to quote the characters \, $, `, and 
              the first character of word.  If - is appended to <<, all leading tabs are stripped from word and 
              from the document.

Also, take a look at: changepass automate password changes on multiple systems