Operating System - HP-UX
1834934 Members
2970 Online
110071 Solutions
New Discussion

Profile with script ksh no work

 
SOLVED
Go to solution
Rene Mendez_4
Super Advisor

Profile with script ksh no work

System HPUX 11.i
In profile the user sybase
call ./SYBASE.sh script

If I use #su - sybase

Report the error:
${HOME:-.}/.profile[28]: SHLIB_PATH: parameter not set

And no set the variable

If I run script out the profile work

Script SYBASE.sh content :
#!/usr/bin/ksh
SYBASE=/sybase12
export SYBASE
SYBASE_FTS=FTS-12_0
export SYBASE_FTS
PATH=/sybase12/ASE-12_0/bin:/sybase12/OCS-12_0/bin:$PATH
export PATH
SHLIB_PATH=/sybase12/ASE-12_0/lib:/sybase12/FTS-12_0/lib:/sybase12/OCS-12_0/lib:
/usr/lib:/lib:/usr/lib/Motif1.2:/sybase12/SQLRemote/lib:$SHLIB_PATH
export SHLIB_PATH
SYBASE_OCS=OCS-12_0
export SYBASE_OCS
SYBASE_ASE=ASE-12_0
export SYBASE_ASE
LM_LICENSE_FILE=/sybase12/SYSAM-1_0/licenses/license.dat:$LM_LICENSE_FILE
export LM_LICENSE_FILE
SYBASE_SYSAM=SYSAM-1_0
export SYBASE_SYSAM

Regards
Rene

4 REPLIES 4
Mark Grant
Honored Contributor

Re: Profile with script ksh no work

I think from what you are saying that the problem is with the .profile, not the SYBASE:sh script.

the "parameter not set" error normally occurs when there is a test ("test, [ or [[) that is testing a variable that hasn't been set yet.

It would be worth posting your .profile so we can see that too.
Never preceed any demonstration with anything more predictive than "watch this"
Rene Mendez_4
Super Advisor

Re: Profile with script ksh no work

My profile only include
. /sybase12/SYBASE.sh

And the script is in /sybase12/SYBASE.sh
Steven E. Protter
Exalted Contributor

Re: Profile with script ksh no work

This problem is that SHLIB_PATH is either being not set, or modified by you inclusion along the following course.

/etc/profile
.profile

SHLIB_PATH being set correct and valid is a requirement of many database installations/scripts.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Profile with script ksh no work

Hi Rene,

The statement "set -u" prompts the shell to return an error if a variable was not previously set. So, the error should be coming from

SHLIB_PATH=/sybase12/ASE-12_0/lib:/sybase12/FTS-12_0/lib:/sybase12/OCS-12_0/lib:
/usr/lib:/lib:/usr/lib/Motif1.2:/sybase12/SQLRemote/lib:$SHLIB_PATH

So, add set +u to your SYBASE.sh and try.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try