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 dot x dot peppler at jpmchase dot com
Subject: Re: Sybase::CTlib and OCS 15 vs OCS 12.5
Date: Mar 28 2008 7:55AM

I don't know much about windows, but this technique most definitely 
doesn't work under Unix, because most of these variables (in particular 
for loading DLLs) can't be set in the process itself - they must be set in 
the calling process.

Try setting these variables in a cmd window, and then running your script 
to see if it helps.


George Brink  
Sent by:
27.03.2008 22:16


Sybase::CTlib and OCS 15 vs OCS 12.5

I live (mostly) on windows with OCS 15, it is
installed into c:\sql.
I also have OCS 12.5 in c:\sql_12-5
Installed sybperl 2.18 into ActivePerl 5.8.8

My problem is that sybperl is compiled against 12.5
and I need to modify my environment before using it.
So i wrote:
                 $ENV{SYBASE}     = 'c:\sql_12-5';
                 $ENV{SYBASE_OCS} = 'OCS-12_5';
                 $ENV{PATH}       = 'c:\sql_12-5\dll';
use strict;
use Sybase::CTlib;
my $sybase_status = new Sybase::CTlib $db_login,
$db_pw, $db_server or die "Can not connect to
print "Connected\n";

And i receive next set of messages:
The context allocation routine failed.

The following problem caused the failure:

Invalid context version.
After that it works fine, I can select/insert/execute.
But what is this "context allocation routine" which

George Brink

Never miss a thing.  Make Yahoo your home page.

This communication is for informational purposes only. It is not
intended as an offer or solicitation for the purchase or sale of
any financial instrument or as an official confirmation of any
transaction. All market prices, data and other information are not
warranted as to completeness or accuracy and are subject to change
without notice. Any comments or statements made herein do not
necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
and affiliates.

This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.

Please refer to for
disclosures relating to UK legal entities.