Trying to connect odbc driver from Unisys from visual cobol, getting the error "x114 item beyond access item beyond bounds of memory (signal 11)".
I have crated a system dsn and trying to connect from cobol program like :
EXEC SQL
CONNECT TO :svr USER :usr-pass
END-EXEC
I also tried to use the below format :
STRING 'DRIVER={Unisys MCP ODBC Driver(x86)};'
'SERVER=xx.x.xx;'
'PORT=2012;'
'DATABASE=test;'
'USER=xxxx;'
'PASSWORD=xxxxx;' INTO BUFFER.
EXEC SQL
CONNECT TO :BUFFER
END-EXEC.
The above is not recognizing the system DSN created and it is giving error "The data source not found and no default driver specified" but while testing on the "ODBC data Source application", the connection is working fine.
Could some one help with what is needed to support unisys data source.
------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
Hi Kayal,
What version of Visual COBOL are you using and under what operating system?
I have never heard of this driver.
By its name, Unisys MCP ODBC Driver(x86), I would assume it is 32-bit.
Is your COBOL program also 32-bit?
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Hi Kayal,
What version of Visual COBOL are you using and under what operating system?
I have never heard of this driver.
By its name, Unisys MCP ODBC Driver(x86), I would assume it is 32-bit.
Is your COBOL program also 32-bit?
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Thank you for the response.
The visual cobol version 8 with latest patch running on windows 64 bit ( windows server 2022). And I am running the cobol application is also ran as 32 bit.
------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
Thank you for the response.
The visual cobol version 8 with latest patch running on windows 64 bit ( windows server 2022). And I am running the cobol application is also ran as 32 bit.
------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
For your format 6 connect statement using the string statement try:
EXEC SQL
CONNECT USING :BUFFER
END-EXEC.
I am not sure if it will make a difference but worth a try...
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
For your format 6 connect statement using the string statement try:
EXEC SQL
CONNECT USING :BUFFER
END-EXEC.
I am not sure if it will make a difference but worth a try...
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
tried the format 6 as well.
------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
tried the format 6 as well.
------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
Your example of format 6 uses TO, Mine uses USING.
Can you try this:
EXEC SQL
CONNECT USING :BUFFER
END-EXEC.
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
tried the format 6 as well.
------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
I am getting sql error : 00019703 with a message "DataSource name not found and no default specified". The document indicates the meaning of the error is could not make connection. We found that the connection is attempted using odbc 2.0 , Could you please help out what is needed to support this on the driver side.
------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
I am getting sql error : 00019703 with a message "DataSource name not found and no default specified". The document indicates the meaning of the error is could not make connection. We found that the connection is attempted using odbc 2.0 , Could you please help out what is needed to support this on the driver side.
------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
OpenESQL uses ODBC V2.0 by default.
So no more 114 error? That is progress.
That means that something in the connect string is wrong.
Can you please try removing the braces from around the driver name?
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
OpenESQL uses ODBC V2.0 by default.
So no more 114 error? That is progress.
That means that something in the connect string is wrong.
Can you please try removing the braces from around the driver name?
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
yes, but it is a progress. I tried with our braces, no luck, same error.
------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
yes, but it is a progress. I tried with our braces, no luck, same error.
------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
Can you please show me the entry in the list of drivers in the ODBC Administrator?

------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Hi Kayal,
What version of Visual COBOL are you using and under what operating system?
I have never heard of this driver.
By its name, Unisys MCP ODBC Driver(x86), I would assume it is 32-bit.
Is your COBOL program also 32-bit?
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------

------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------

------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
Which DSN are you using? The highlighted one is using the 64-bit version of the driver.
Can you shou me the drivers tab?
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------

------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
I am using the dsn name : SCODETEST32 , please find the driver details :

------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
I am using the dsn name : SCODETEST32 , please find the driver details :

------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
What SQL compiler directives are you using?
You could try adding SQL(ODBCTRACE=ALWAYS) to get an ODBC trace file.
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
I am using the dsn name : SCODETEST32 , please find the driver details :

------------------------------
Kayal vizhi
Rocket Forum Shared Account
------------------------------
I have not set any directives specifically; it is the default one. Let me try with your suggestion.
Thank you.
------------------------------
Kayalvizhi Ganesan
Rocket Forum Shared Account
------------------------------
I have not set any directives specifically; it is the default one. Let me try with your suggestion.
Thank you.
------------------------------
Kayalvizhi Ganesan
Rocket Forum Shared Account
------------------------------
Hello Chris,
By using format 6 to call unisys driver is not even reaching to Unisys driver and we are getting sql error : 00019703 with a message "DataSource name not found and no default specified". With the below method, we are
EXEC SQL
CONNECT TO :dsnname USER :usr-pass
END-EXEC
I could see the call is coming Unisys driver and some reason we are getting "x114 item beyond access item beyond bounds of memory". We would like to understand what is expected response for connect method.
Thanks,
Kayal
------------------------------
Kayalvizhi Ganesan
Unisys Corporation
------------------------------
Hello Chris,
By using format 6 to call unisys driver is not even reaching to Unisys driver and we are getting sql error : 00019703 with a message "DataSource name not found and no default specified". With the below method, we are
EXEC SQL
CONNECT TO :dsnname USER :usr-pass
END-EXEC
I could see the call is coming Unisys driver and some reason we are getting "x114 item beyond access item beyond bounds of memory". We would like to understand what is expected response for connect method.
Thanks,
Kayal
------------------------------
Kayalvizhi Ganesan
Unisys Corporation
------------------------------
During CONNECT, we observed the sequence of ODBC API call from visual cobol to the driver, and noticed SQLSetStmtAttr is where this error orginates.
SQLRETURN SQLSetStmtAttr( SQLHSTMT StatementHandle,
SQLINTEGER Attribute,
SQLPOINTER ValuePtr,
SQLINTEGER StringLength);
The NULL value is passed for valuePtr to the driver from COBOL , which is causing the issue.
------------------------------
Kayalvizhi Ganesan
Unisys Corporation
------------------------------
During CONNECT, we observed the sequence of ODBC API call from visual cobol to the driver, and noticed SQLSetStmtAttr is where this error orginates.
SQLRETURN SQLSetStmtAttr( SQLHSTMT StatementHandle,
SQLINTEGER Attribute,
SQLPOINTER ValuePtr,
SQLINTEGER StringLength);
The NULL value is passed for valuePtr to the driver from COBOL , which is causing the issue.
------------------------------
Kayalvizhi Ganesan
Unisys Corporation
------------------------------
I do not have your driver to test with, so I am testing with a SQL Server driver.
I have tried several different configurations and I am generating an ODBC trace and it in I do not see any calls to SQLSetStmtAttr.
SQLSetStmtAttr appears to be an ODBC V3.0 call and I believe that your driver is ODBC 2.0, which is the default for OpenESQL.
Can you possibly upload your MSSQLTRACE.LOG file that is generated for your connect statement so that I can compare it?
Thanks
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
I do not have your driver to test with, so I am testing with a SQL Server driver.
I have tried several different configurations and I am generating an ODBC trace and it in I do not see any calls to SQLSetStmtAttr.
SQLSetStmtAttr appears to be an ODBC V3.0 call and I believe that your driver is ODBC 2.0, which is the default for OpenESQL.
Can you possibly upload your MSSQLTRACE.LOG file that is generated for your connect statement so that I can compare it?
Thanks
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Hello Chris,
You are right SQLSetStmtAttr is ODBC V3.0, and our Driver is following ODBC3.0. Looks like the call from visual cobol is coming as ODBC2.0 API. Could you please suggest how to specify the visual cobol to use ODBC3.0 API standards to call our driver. Is there a directive that needs to be set?
Thanks in advance.
------------------------------
Kayalvizhi Ganesan
Unisys Corporation
------------------------------
Hello Chris,
You are right SQLSetStmtAttr is ODBC V3.0, and our Driver is following ODBC3.0. Looks like the call from visual cobol is coming as ODBC2.0 API. Could you please suggest how to specify the visual cobol to use ODBC3.0 API standards to call our driver. Is there a directive that needs to be set?
Thanks in advance.
------------------------------
Kayalvizhi Ganesan
Unisys Corporation
------------------------------
Try SQL(ODBCV3)
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Try SQL(ODBCV3)
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
I have enabled the ODBCV3 version and sent the ODBC trace file for x114 error.
Regards,
Kayal
------------------------------
Kayalvizhi Ganesan
Unisys Corporation
------------------------------
I have enabled the ODBCV3 version and sent the ODBC trace file for x114 error.
Regards,
Kayal
------------------------------
Kayalvizhi Ganesan
Unisys Corporation
------------------------------
I do not see the MFSQLTRACE.LOG file attached to your post.
Can you please attach it so that I may review it?
Thanks
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
I do not see the MFSQLTRACE.LOG file attached to your post.
Can you please attach it so that I may review it?
Thanks
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Chirs,
Please find the odbc trace file attached in the mail.
Thanks,
Kayal
Chirs,
Please find the odbc trace file attached in the mail.
Thanks,
Kayal
Hope you received the trace for odbc trace file generated from visual cobol side sent over email.
------------------------------
Kayalvizhi Ganesan
Unisys Corporation
------------------------------
Hope you received the trace for odbc trace file generated from visual cobol side sent over email.
------------------------------
Kayalvizhi Ganesan
Unisys Corporation
------------------------------
I did receive the trace file and have shared it with development.
We are currently taking a look.
Thanks
------------------------------
Chris Glazier
Principal Technical Support Specialist
Rocket Forum Shared Account
------------------------------
Hope you received the trace for odbc trace file generated from visual cobol side sent over email.
------------------------------
Kayalvizhi Ganesan
Unisys Corporation
------------------------------
Hi Kayalvizhi,
Are there any other EXEC SQL statements after the EXEC SQL CONNECT?
The ODBC trace shows some SQLFetch calls, which I would expect if there were other EXEC SQL statements in the program.
Can you also enable the directive SQL(TRACELEVEL=4) at compile time and rerun the program?
This should produce another runtime trace file OpenESQLTrace.<processID>.log and hope it will show more information.
Thanks.
------------------------------
Laurence Jao
Rocket Forum Shared Account
------------------------------