Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2012
    Posts
    2

    Unanswered: solved ~~ source SYBASE.csh problem... syntax error: unexpected end of file

    **system : RHEL 6

    when i try to source the SYBASE.csh, it give me such error
    bash: setenv: command not found
    bash: setenv: command not found
    bash: setenv: command not found
    bash: setenv: command not found
    bash: SYBASE.csh: line 64: syntax error: unexpected end of file


    /*** original file start **** /
    #
    # Sybase Product Environment variables
    #
    setenv SYBASE_JRE6_32 /opt/sybase/shared/JRE-6_0_24_32BIT
    setenv SYBASE_JRE6 /opt/sybase/shared/JRE-6_0_24_64BIT
    setenv SYBASE_JRE6_64 /opt/sybase/shared/JRE-6_0_24_64BIT
    setenv SYBASE_OCS OCS-15_0
    if ( $?INCLUDE == "0" ) then
    setenv INCLUDE ""
    endif
    setenv INCLUDE /opt/sybase/OCS-15_0/include:"$INCLUDE"
    if ( $?LIB == "0" ) then
    setenv LIB ""
    endif
    setenv LIB /opt/sybase/OCS-15_0/lib:"$LIB"
    if ( $?PATH == "0" ) then
    setenv PATH ""
    endif
    setenv PATH /opt/sybase/OCS-15_0/bin:"$PATH"
    if ( $?LD_LIBRARY_PATH == "0" ) then
    setenv LD_LIBRARY_PATH ""
    endif
    setenv LD_LIBRARY_PATH /opt/sybase/OCS-15_0/lib:/opt/sybase/OCS-15_0/lib3p64:/opt/sybase/OCS-15_0/lib3p:"$LD_LIBRARY_PATH"
    if ( $?PATH == "0" ) then
    setenv PATH ""
    endif
    setenv PATH /opt/sybase/UAF-2_5/bin:"$PATH"
    setenv SYBASE_UA /opt/sybase/UAF-2_5
    setenv SYBASE_PLATFORM linux
    if ( $?LD_LIBRARY_PATH == "0" ) then
    setenv LD_LIBRARY_PATH ""
    endif
    setenv LD_LIBRARY_PATH /opt/sybase/DataAccess/ODBC/lib:"$LD_LIBRARY_PATH"
    if ( $?LD_LIBRARY_PATH == "0" ) then
    setenv LD_LIBRARY_PATH ""
    endif
    setenv LD_LIBRARY_PATH /opt/sybase/DataAccess64/ODBC/lib:"$LD_LIBRARY_PATH"
    setenv SCROOT /opt/sybase/shared/sybcentral600
    if ( $?PATH == "0" ) then
    setenv PATH ""
    endif
    setenv PATH /opt/sybase/DBISQL/bin:"$PATH"
    setenv SYBROOT /opt/sybase
    if ( $?PATH == "0" ) then
    setenv PATH ""
    endif
    setenv PATH /opt/sybase/ASEP/bin:"$PATH"
    setenv SYBASE /opt/sybase
    setenv SYBASE_ASE ASE-15_0
    if ( $?PATH == "0" ) then
    setenv PATH ""
    endif
    setenv PATH /opt/sybase/ASE-15_0/bin:/opt/sybase/ASE-15_0/install:"$PATH"
    setenv SYBASE_JRE_RTDS /opt/sybase/shared/JRE-6_0_24_64BIT
    if ( $?LD_LIBRARY_PATH == "0" ) then
    setenv LD_LIBRARY_PATH ""
    endif
    setenv LD_LIBRARY_PATH /opt/sybase/ASE-15_0/lib:"$LD_LIBRARY_PATH"
    setenv SYBASE_WS WS-15_0
    if ( $?PATH == "0" ) then
    setenv PATH ""
    endif
    setenv PATH /opt/sybase/ASE-15_0/jobscheduler/bin:"$PATH"
    /*** original file end **** /


    to fix the error above...i edit few line...it still give this error when i try to source it again
    bash: SYBASE.csh: line 64: syntax error: unexpected end of file

    anyone can give me a direction for how to fix this?
    thanks in advance

    /*** file after edit start **** /
    #
    # Sybase Product Environment variables
    #
    export SYBASE_JRE6_32="/opt/sybase/shared/JRE-6_0_24_32BIT"
    export SYBASE_JRE6="/opt/sybase/shared/JRE-6_0_24_64BIT"
    export SYBASE_JRE6_64="/opt/sybase/shared/JRE-6_0_24_64BIT"
    export SYBASE_OCS="/opt/sybase/OCS-15_0"
    if ( $?INCLUDE == "0" ) then
    setenv INCLUDE ""
    endif
    setenv INCLUDE /opt/sybase/OCS-15_0/include:"$INCLUDE"
    if ( $?LIB == "0" ) then
    setenv LIB ""
    endif
    setenv LIB /opt/sybase/OCS-15_0/lib:"$LIB"
    if ( $?PATH == "0" ) then
    setenv PATH ""
    endif
    setenv PATH /opt/sybase/OCS-15_0/bin:"$PATH"
    if ( $?LD_LIBRARY_PATH == "0" ) then
    setenv LD_LIBRARY_PATH ""
    endif
    setenv LD_LIBRARY_PATH /opt/sybase/OCS-15_0/lib:/opt/sybase/OCS-15_0/lib3p64:/opt/sybase/OCS-15_0/lib3p:"$LD_LIBRARY_PATH"
    if ( $?PATH == "0" ) then
    setenv PATH ""
    endif
    setenv PATH /opt/sybase/UAF-2_5/bin:"$PATH"
    setenv SYBASE_UA /opt/sybase/UAF-2_5
    setenv SYBASE_PLATFORM linux
    if ( $?LD_LIBRARY_PATH == "0" ) then
    setenv LD_LIBRARY_PATH ""
    endif
    setenv LD_LIBRARY_PATH /opt/sybase/DataAccess/ODBC/lib:"$LD_LIBRARY_PATH"
    if ( $?LD_LIBRARY_PATH == "0" ) then
    setenv LD_LIBRARY_PATH ""
    endif
    setenv LD_LIBRARY_PATH /opt/sybase/DataAccess64/ODBC/lib:"$LD_LIBRARY_PATH"
    setenv SCROOT /opt/sybase/shared/sybcentral600
    if ( $?PATH == "0" ) then
    setenv PATH ""
    endif
    setenv PATH /opt/sybase/DBISQL/bin:"$PATH"
    setenv SYBROOT /opt/sybase
    if ( $?PATH == "0" ) then
    setenv PATH ""
    endif
    setenv PATH /opt/sybase/ASEP/bin:"$PATH"
    setenv SYBASE /opt/sybase
    setenv SYBASE_ASE ASE-15_0
    if ( $?PATH == "0" ) then
    setenv PATH ""
    endif
    setenv PATH /opt/sybase/ASE-15_0/bin:/opt/sybase/ASE-15_0/install:"$PATH"
    setenv SYBASE_JRE_RTDS /opt/sybase/shared/JRE-6_0_24_64BIT
    if ( $?LD_LIBRARY_PATH == "0" ) then
    setenv LD_LIBRARY_PATH ""
    endif
    setenv LD_LIBRARY_PATH /opt/sybase/ASE-15_0/lib:"$LD_LIBRARY_PATH"
    setenv SYBASE_WS WS-15_0
    if ( $?PATH == "0" ) then
    setenv PATH ""
    endif
    setenv PATH /opt/sybase/ASE-15_0/jobscheduler/bin:"$PATH"
    /*** file after edit end **** /
    Last edited by ghostshell; 02-11-12 at 12:21. Reason: resolve the problem

  2. #2
    Join Date
    Jan 2012
    Location
    Lisbon
    Posts
    115
    Provided Answers: 1
    Hi,

    The SYBASE.sh ou .csh, doesn't need to be changed, normally.

    So i would try to ask you how are you running the scritp?

    Because the last times i've used rhel, with sybase. In order to set the environment variables, i had to run the script like so:

    $root@.....> . SYBASE.sh

    notice is "dot space script" ". SYBASE.sh"

    Try it and check the environment variables: "env" comand.

  3. #3
    Join Date
    Feb 2012
    Posts
    2
    Quote Originally Posted by Catarrunas View Post
    Hi,

    The SYBASE.sh ou .csh, doesn't need to be changed, normally.

    So i would try to ask you how are you running the scritp?

    Because the last times i've used rhel, with sybase. In order to set the environment variables, i had to run the script like so:

    $root@.....> . SYBASE.sh

    notice is "dot space script" ". SYBASE.sh"

    Try it and check the environment variables: "env" comand.
    i just use >> source SYBASE.csh

    after i comment out those if statement...it working fine
    thanks for the reply anyway

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •