PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Christian Behrens" <chrisb42 at gmx dot net>
Subject: Is it possible to preset the SYBASE_OCS variable?
Date: Nov 3 2004 8:06PM

I apologize if this has been asked before, but I searched the archive and
haven't found a real answer.

Here's the situation:

I've been asked to look into setting up SybPerl (current release 2.17_3) in
a way that the Sybase environment doesn't have to be set to run scripts.

This is the relevant part in the CONFIG file I use:

"# Where is the Sybase directory on your system (include files &
# libraries are expected to be found at SYBASE/include & SYBASE/lib
SYBASE=/usr/global/opt/sybase

# If EMBED_SYBASE is TRUE (1), then we add BEGIN { $ENV{SYBASE} = $SYBASE}
# at the top of both Sybase::DBlib and Sybase::CTlib. This ensures that
# the correct value for the SYBASE environment variable is always set.
# The downside is that if you install a new version of Sybase (OpenClient
# in particular) in a different location (say /opt/sybase/11.9.2 instead of
# /opt/sybase/11.5.1) then you need to rebuild sybperl with the new value -
# setting the SYBASE environment variable will have no effect.
EMBED_SYBASE = 1"

Now, as we use Sybase 12.5, there are no SYBASE/include & SYBASE/lib
directories, thus I had to set links to OCS/lib and OCS/include,
respectively.

Also, the comment about EMBED_SYBASE that "setting the SYBASE environment
variable will have no effect" doesn't seem to be true (anymore?), as
CTlib.pm and DBlib.pm have this:

BEGIN {
    if(!$ENV{'SYBASE'}) {
        $ENV{'SYBASE'} = '/usr/global/opt/sybase';
    }
}

That suggests to me that a previously set SYBASE env var would have
preference, no?

But what about SYBASE_OCS, is there any way to pre-set that as well? If not,
is there any way to not have to set the links to 'lib' and 'include' as
mentioned above?

I tried to simply extend the above to also set SYBASE_OCS, but the symbolic
links were still needed in order to find the libraries.

Thanks for any insight.

-Christian Behrens

-- 
Geschenkt: 3 Monate GMX ProMail + 3 Top-Spielfilme auf DVD
++ Jetzt kostenlos testen http://www.gmx.net/de/go/mail ++