word too long

Hello,
When I try to run a shell script, It throws an error:

$ ./SQLExecute.csh
Word too long
$ echo $CLASSPATH
/u02/installs/calypso/calypsorel90000/jars/
$ echo $PATH
/usr/bin:/usr/local/bin:/usr/ccs/bin:/usr/openwin/bin:/u02/app/oracle/product/10.2.0/db_1:/u02/app/oracle/product/10.2.0/db_1/bin:/u02/app/oracle/product/10.2.0/db_1/network/admin:/u02/installs/java/jre1.5.0_13/bin:/u02/installs/calypso/calypsorel90000/jars/
$

Please suggest - What could be the reason?

Are you trying to echo a word which has more than 1024 characters in it ?

Try the same in bash / ksh / zsh !!!

I am trying to run a shell script:

$ zsh
slhrpsol002% ./SQLExecute.csh
Word too long
slhrpsol002% bash
bash-3.00$ ./SQLExecute.csh
Word too long
bash-3.00$ ksh
$ ./SQLExecute.csh
Word too long
$

Whats the she-bang line ?

If thats something for "csh"

try running it as,

zsh <scriptname>

There is no shebang line in any scripts and all scripts have extension .csh

bash-3.00$ zsh /u02/calypsorel90000/bin/unix/jdk12/SQLExecute.csh
Word too long
bash-3.00$

I doubt the env variable PATH :confused:

Is it too long ?

Is .cshrc sourced many times ?

$ echo $PATH
/usr/bin:/usr/local/bin:/usr/ccs/bin
$ ls -la
drwxr-xr-x 2 calypso users 512 Feb 4 06:57 .
drwxrwxrwx 10 root root 512 Feb 4 06:10 ..
-rw------- 1 calypso users 21 Feb 4 06:57 .bash_history
-rw-r--r-- 1 calypso users 403 Feb 4 06:11 .profile
-rw------- 1 calypso users 3546 Feb 4 07:28 .sh_history
-rw-r--r-- 1 calypso users 136 Feb 2 07:32 local.cshrc
-rw-r--r-- 1 calypso users 157 Feb 2 07:32 local.login
-rw-r--r-- 1 calypso users 174 Feb 2 07:32 local.profile
$ more local.cshrc
#ident "@(#)local.cshrc 1.2 00/05/01 SMI"
umask 022
set path=(/bin /usr/bin /usr/ucb /etc .)
if ( $?prompt ) then
set history=32
endif
$

When I said I doubt the env variable $PATH,
I meant - whether it (PATH) is redefined again in the script to a point where the number of characters exceeds 1024.

Sorry for not being clear.