`<' is not matched. in Borne Shell

OS: AIX 4.1, Hardware IBM/RS6000, Script: Borne(i believe)
Error:hot[143]: 0403-057 Syntax error at line 150 : `<' is not
matched.
My Script: hot
Code in Question: if is line 143, svrmgrl is line 150, << is in question
DYNSIZE=`ls -al $TSLIST | awk '{print $5}'`
echo "dynsize = $DYNSIZE"
if [ $DYNSIZE = 0 ]; then
  echo "${JOBNAME_SHORT}: No tablespaces in backup mode."
else
  echo "DEBUG: altering ts end backup "
  cat $TSLIST | while read TSNAME
  do
    echo "DEBUG: end backup1 "
    svrmgrl <<EOF
    connect internal
    alter tablespace $TSNAME end backup;
    quit
    EOF
    echo "DEBUG: end backup2"
  done
fi

This works in the prior two usages?
Example:
#
# build database file list
#
echo "DEBUG: build database file list"
echo "${JOBNAME_SHORT}: building dynamic parameter file."
sqlplus -s > $DBBACKUP <<EOF
sysop2/backup
set pagesize 0
set linesize 2048
set heading off
set feedback off
column TNAME format a20
column FNAME format a80
select tablespace TSNAME, cmdtext COMMAND, subseq SEQENCE
    from sysop2.admin_backup
    order by subseq;
quit
EOF
cat $DBBACKUP  

Question:
- how do i resolve this error
LVL 2
banickiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ozoCommented:
Don't indent the
EOF
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
banickiAuthor Commented:
I've already tried that...  
Will try again...
0
banickiAuthor Commented:
i removed the indentation...
same error...
got to thinking if its that sensititive about spaces...
why not check for trailing spaces...
bingo...
Thanks...
Terry
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

banickiAuthor Commented:
do you have to post an answer to get points?
0
banickiAuthor Commented:
thanks...
now that i know i can except comments as an answer...
i can clean up all these notes...
thanks again...
terry
0
ozoCommented:
If you want to include spaces around the EOF at the end, you can include a matching number of spaces around the EOF ar the <<
   svrmgrl <<'   EOF '
   quit
   EOF
0
banickiAuthor Commented:
Cool!
I got volunteered to write the oracle online backup scripts.
Found some sample scripts in the oracle documentation.
Thought that would be a good place to start...
I cut it out of the doc and pasted it in to notepad...
then ftp'd it to the AIX server... Then the fun began...
a ton of code, and none of it worked...
but thanks to you and helver, its running, tested, and
going production tomorrow.  
I greatly appreciated you time.
Terry
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.