Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Is it possible to preset the SYBASE_OCS variable?
Date: Nov 3 2004 8:16PM

On Wed, 2004-11-03 at 21:06, Christian Behrens wrote:
> 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.

> 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.

Actually at run-time you don't need the SYBASE_OCS variable, AFAIK. What
*is* needed is for the run-time linker ( on most systems) to find
the Sybase libraries. This is done either by having LD_LIBRARY_PATH set
correctly, by having correct entries in /etc/ or by making
sure that the full path of the .so files is stored in the binaries (e.g.
using the -R linker option on Solaris).

> Also, the comment about EMBED_SYBASE that "setting the SYBASE environment
> variable will have no effect" doesn't seem to be true (anymore?), as
> and have this:
>     if(!$ENV{'SYBASE'}) {
>         $ENV{'SYBASE'} = '/usr/global/opt/sybase';
>     }
> }
> That suggests to me that a previously set SYBASE env var would have
> preference, no?

Correct - the documentation is out-of-date.

> 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.

What platform are you on?

Michael Peppler                              Data Migrations, Inc.             
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or 
long term contract positions -