setenv error

I am having the following environment setup script.

$cat dbenv.sh
#! /bin/csh
#
set history=32
stty sane

setenv ORACLE_HOME=/dboracle/orabase/product/10.1.0.3
set ORACLE_BASE=/dboracle/orabase
set LD_LIBRARY_PATH=/usr/openv/netbackup/bin:$ORACLE_HOME/lib:/usr/dt/lib:/usr/lib:/usr/ccs/bin:/usr/ucb
set ORACLE_OWNER=oracle
set ORACLE_TERM=vt220
set ORACLE_SID=MYDB
set ORACLE_BIN=${ORACLE_HOME}/bin
# Set up common environment
set PATH=${ORACLE_BIN}:${ORACLE_HOME}:/bin:/usr/sbin:/usr/bin:/bin:/usr/openwin/bin:${PATH}

alias dbenv="source ~oracle/.dbenv"
alias dba="sqlplus '/ as sysdba'"

When I run this script from command prompt, I get error as follows.

$ /export/home/rahul/bin/dbenv.sh
setenv: Syntax Error.

This is the error I get when, I run from any shell [bash/ksh/csh].

Let me know what is wrong with the setenv statements in the script or if there is some other configuration to be changed.

Thanks,
Rahul.

this is a csh script (as indicated by your shbang).

In the csh, unlike bash and korn, you do not use = to set variables.

So you should have

setenv ORACLE_HOME /dboracle/orabase/product/10.1.0.3

etc

thanks

James is right about your setenv but your set statements are probably wrong too...
set ORACLE_SID=MYDB
Yeah, that syntax is correct to set a local variable to the c script, but that needs to be an envirorment variable. Like this...
setenv ORACLE_SID MYDB
And that shebang is troubling. It will take effect if you run this file as separate script. If you do that, you will create a new process, it will run the script and set some of its environment variables, then it will exit and the environment you set up will cease to exist. This file needs to be sourced by the interactive shell as you start to run. Then it will set the interactive shells environment. Also it might be sourced near the top of csh scripts that will need Oracle. But in each of these cases, you are effecting a csh that is already running.