Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

sybperl question

5 posts in General Discussion Last posting was on 2011-08-19 19:14:19.0Z
George Brink Posted on 2011-08-17 16:51:05.0Z
From: George Brink <siberianowl@yahoo.com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: sybperl question
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e4bf179$1@forums-1-dub>
Date: 17 Aug 2011 09:51:05 -0700
X-Trace: forums-1-dub 1313599865 10.22.241.152 (17 Aug 2011 09:51:05 -0700)
X-Original-Trace: 17 Aug 2011 09:51:05 -0700, vip152.sybase.com
Lines: 35
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30468
Article PK: 72649

I know it is probably a 'wrong' newsgroup for the question, but it looks
like sybperl mail-list is down, I got an 'user unknown' response from
both sybperl-l@peppler.org and sybperl-l-request@peppler.org. Which is
very strange...



Anyway, this news group is the next best place, so here is my question:

How to do an error checking in Sybase::CTlib without using callbacks?
If I'd use OC directly, I would write something like:

--------------------------------
ct_diag(connection, CS_INIT, CS_UNUSED, CS_UNUSED, NULL);
if( ct_command(...) != CS_SUCCEED) {
printError(connection)
die();
}

void printError(CtConnection * connection) {
ct_diag(connection, CS_STATUS, CS_SERVERMSG_TYPE, CS_UNUSED,
&countOfMessages)
for(messageNumber=1; messageNumber<=countOfMessages; messageNumber++) {
ct_diag(connection, CS_GET, CS_SERVERMSG_TYPE, messageNumber,
&serverErrorMessage);
... etc;
--------------------------------

How to do the same in Perl?


And a second question:
The last version of sybperl is 2.18 from April 2005. No changes for six
years?


Michael Peppler [Team Sybase] Posted on 2011-08-18 04:51:04.0Z
From: "Michael Peppler [Team Sybase]" <mpeppler@peppler.org>
Organization: Peppler Consulting SARL
Subject: Re: sybperl question
User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Message-ID: <pan.2011.08.18.04.50.58.151914@peppler.org>
Newsgroups: sybase.public.ase.general
References: <4e4bf179$1@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 17 Aug 2011 21:51:04 -0700
X-Trace: forums-1-dub 1313643064 10.22.241.152 (17 Aug 2011 21:51:04 -0700)
X-Original-Trace: 17 Aug 2011 21:51:04 -0700, vip152.sybase.com
Lines: 52
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30469
Article PK: 72648


On Wed, 17 Aug 2011 09:51:05 -0700, George Brink wrote:

> I know it is probably a 'wrong' newsgroup for the question, but it looks
> like sybperl mail-list is down, I got an 'user unknown' response from both
> sybperl-l@peppler.org and sybperl-l-request@peppler.org. Which is very
> strange...

I was getting too much spam compared with the number of actual messages on
the list - so I shut it down.


> Anyway, this news group is the next best place, so here is my question:
>
> How to do an error checking in Sybase::CTlib without using callbacks? If
> I'd use OC directly, I would write something like:
>
> --------------------------------
> ct_diag(connection, CS_INIT, CS_UNUSED, CS_UNUSED, NULL); if(
> ct_command(...) != CS_SUCCEED) {
> printError(connection)
> die();
> }
> }
> void printError(CtConnection * connection) {
> ct_diag(connection, CS_STATUS, CS_SERVERMSG_TYPE, CS_UNUSED,
> &countOfMessages)
> for(messageNumber=1; messageNumber<=countOfMessages; messageNumber++)
> {
> ct_diag(connection, CS_GET, CS_SERVERMSG_TYPE, messageNumber,
> &serverErrorMessage);
> ... etc;
> --------------------------------
>
> How to do the same in Perl?

I don't think that this is possible. I never implemented the ct_diag()
call.


> And a second question:
> The last version of sybperl is 2.18 from April 2005. No changes for six
> years?

There hasn't been much that needed changing - ClientLibrary hasn't had
many new features that needed to get implemented. And my focus (such as it
is) has been on DBD::Sybase.

As an aside - on Sep. 3 sybperl will officially turn 20. I asked for beta
testers for the first version of sybperl on sep. 3 1991...

Michael


George Brink Posted on 2011-08-18 16:53:45.0Z
From: George Brink <siberianowl@yahoo.com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20110812 Thunderbird/6.0
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: sybperl question
References: <4e4bf179$1@forums-1-dub> <pan.2011.08.18.04.50.58.151914@peppler.org>
In-Reply-To: <pan.2011.08.18.04.50.58.151914@peppler.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e4d4399$1@forums-1-dub>
Date: 18 Aug 2011 09:53:45 -0700
X-Trace: forums-1-dub 1313686425 10.22.241.152 (18 Aug 2011 09:53:45 -0700)
X-Original-Trace: 18 Aug 2011 09:53:45 -0700, vip152.sybase.com
Lines: 13
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30472
Article PK: 72651


On 8/18/2011 12:51 AM, Michael Peppler [Team Sybase] wrote:

> I was getting too much spam compared with the number of actual messages on
> the list - so I shut it down.

Well, you probably should correct the sybperl's web-page accordingly :)


> I don't think that this is possible. I never implemented the ct_diag()
> call.
I think, that will be a good addition for a new version.
As well as modifications to Makefile.pl for better installation on
Windows/MinGW with OC15 in mind.
For the last one I can send you a patch...


Michael Peppler [Team Sybase] Posted on 2011-08-19 04:49:35.0Z
From: "Michael Peppler [Team Sybase]" <mpeppler@peppler.org>
Organization: Peppler Consulting SARL
Subject: Re: sybperl question
User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Message-ID: <pan.2011.08.19.04.49.35.354460@peppler.org>
Newsgroups: sybase.public.ase.general
References: <4e4bf179$1@forums-1-dub> <pan.2011.08.18.04.50.58.151914@peppler.org> <4e4d4399$1@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 18 Aug 2011 21:49:35 -0700
X-Trace: forums-1-dub 1313729375 10.22.241.152 (18 Aug 2011 21:49:35 -0700)
X-Original-Trace: 18 Aug 2011 21:49:35 -0700, vip152.sybase.com
Lines: 22
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30479
Article PK: 72658


On Thu, 18 Aug 2011 09:53:45 -0700, George Brink wrote:

> On 8/18/2011 12:51 AM, Michael Peppler [Team Sybase] wrote:
>
>> I was getting too much spam compared with the number of actual messages
>> on the list - so I shut it down.
> Well, you probably should correct the sybperl's web-page accordingly :)
>
>
>> I don't think that this is possible. I never implemented the ct_diag()
>> call.
> I think, that will be a good addition for a new version. As well as
> modifications to Makefile.pl for better installation on Windows/MinGW with
> OC15 in mind.
> For the last one I can send you a patch...

Patches are always welcome!

Thanks,

Michael


George Brink Posted on 2011-08-19 19:14:19.0Z
From: George Brink <siberianowl@yahoo.com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20110812 Thunderbird/6.0
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: sybperl question
References: <4e4bf179$1@forums-1-dub> <pan.2011.08.18.04.50.58.151914@peppler.org> <4e4d4399$1@forums-1-dub> <pan.2011.08.19.04.49.35.354460@peppler.org>
In-Reply-To: <pan.2011.08.19.04.49.35.354460@peppler.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e4eb60b$1@forums-1-dub>
Date: 19 Aug 2011 12:14:19 -0700
X-Trace: forums-1-dub 1313781259 10.22.241.152 (19 Aug 2011 12:14:19 -0700)
X-Original-Trace: 19 Aug 2011 12:14:19 -0700, vip152.sybase.com
Lines: 100
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30480
Article PK: 72659


On 8/19/2011 12:49 AM, Michael Peppler [Team Sybase] wrote:
>> modifications to Makefile.pl for better installation on Windows/MinGW with
>> OC15 in mind.
>> For the last one I can send you a patch...
>
> Patches are always welcome!

Tested on environment:
OS: Windows.
OpenClient: from 15.0 to 15.5

==== util/config.pl.patch
130c130,135
< my $lib = "$dir/lib";
---
> my $lib;
> if($^O eq 'MSWin32') {
> $lib = "$dir/dll";
> } else {
> $lib = "$dir/lib";
> }
====

==== CTLib/Makefile.PL.patch
52,53c52,53
< if($$sattr{BORLAND_LIBS}) {
< $lib_string = "-L$SYBASE\\blib -llibcs -llibct -llibcomn -llibblk";
---
> if($newlibnames == 1) {
> $lib_string = "-L$SYBASE\\lib -llibsybcs -llibsybct -llibsybblk";
55c55,59
< $lib_string = "-L$SYBASE\\lib -llibcs -llibct -llibcomn -llibblk";
---
> if($$sattr{BORLAND_LIBS}) {
> $lib_string = "-L$SYBASE\\blib -llibcs -llibct -llibcomn -llibblk";
> } else {
> $lib_string = "-L$SYBASE\\lib -llibcs -llibct -llibcomn -llibblk";
> }
====

==== DBLib/Makefile.PL.patch
44,45c44,45
< if($$sattr{BORLAND_LIBS}) {
< $lib_string = "-L$SYBASE\\blib -llibcomn -llibsybdb";
---
> if($newlibnames == 1) {
> $lib_string = "-L$SYBASE\\lib -llibsybdb";
47c47,51
< $lib_string = "-L$SYBASE\\lib -llibcomn -llibsybdb";
---
> if($$sattr{BORLAND_LIBS}) {
> $lib_string = "-L$SYBASE\\blib -llibcomn -llibsybdb";
> } else {
> $lib_string = "-L$SYBASE\\lib -llibcomn -llibsybdb";
> }
====




To allow compilation of Sybperl by GNU C from MinGW we need to:
1) Copy, link or rename all OC's libraries libsyb*.lib into libsyb*.a
This is required by perl's MakeMaker module, somehow it does not know
that gcc is able to work with .lib extension of library files.

2) Also we need to patch the OC's includes:
==== csconfig.h.patch
58a59,65
> /*
> ** Load MinGW specific definitions
> */
> #if defined(__MINGW32__)
> #include "_mingw.h"
> #endif /* __MINGW32__ */
>
>
74c81
< #if ((SYB_MSC_VER >= 800) || defined(__BORLANDC__))
---
> #if ((SYB_MSC_VER >= 800) || defined(__BORLANDC__) ||
defined(__MINGW32__))
84c91
< #else /* ((SYB_MSC_VER >= 800) || defined(__BORLANDC__)) */
---
> #else /* ((SYB_MSC_VER >= 800) || defined(__BORLANDC__) ||
defined(__MINGW32__)) */
94c101
< #endif /* ((SYB_MSC_VER >= 800) || defined(__BORLANDC__)) */
---
> #endif /* ((SYB_MSC_VER >= 800) || defined(__BORLANDC__) ||
defined(__MINGW32__)) */
====

==== sybfront.h.patch
162c162
< #if !defined(_MSC_VER) && !defined(__BORLANDC__)
---
> #if !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(__MINGW32__)
====