We have Sybase Adaptive Server version 12.0 on Windows NT 4.0. The connect
statement works in isql and we are able to use the user tables (select,
etc.).
However when running an application program compiled with SQL/COBOL
(cobpre and then Merant NetExpress 3.1 for Windows NT), the Connect
statement does not work and the result in the sybinit.err file is :

>
>The context allocation routine failed.
>
>The following problem caused the failure:
>
>Invalid context version.
>

The syntax used is:

EXEC SQL CONNECT :USERID IDENTIFIED BY :PASSWO END-EXEC.

The Sybase pre-compiler translates the call as

CALL "CSBCTXGLOBAL" USING SQL--CS-VERSION
SQL--RETCODE SQL--CTX OF SQL--HANDLES
IF SQL--RETCODE NOT EQUAL CS-SUCCEED
MOVE 25001 TO SQL--INTRERR
PERFORM SQL--CTXERR
END-IF

Thanks for your help
Thierry Jean