Skip to main content

Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

You post is a bit confusing.  

Are you currently using this program containing InstantSQL statements with another database, or MySQL ODBC driver on a 32-bit system, with correct results?  In other words, are you already familiar with InstantSQL?

Is the MySQL ODBC driver working using odbctest (from the unixodbc install)?

You say, "If an error..."  Are you getting data back on non-error situations already, or is this error path the first thing you have tested?


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Thank you for the reply Tom.

I am very familiar with the Instant SQL product and have been using it successfully  for many years.

The identical COBOL program and mysql database table function perfectly in the 32 bit world.

Using the 64 bit runtime all CONNECTS and INSERTS seem to be working fine.

However, in my case I am getting a DUPLICATE KEY error (an artifact of mysql where upper/lower case are equivalent). In the 32bit runtime this error is returned correctly. In the 64bit runtime the first few fields of the structure sql-error-description are loaded correctly but the rest are not. The value SQL-RETURN is 2701 (instead of expected 0 or 1) and the sql-ERRMSG field is empty. I have full Debug session memory dumps as proof. Not sure how to post those here.

The odbc test on Centos Linux works fine.

isql ncs t1adm topsecret


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Thank you for the reply Tom.

I am very familiar with the Instant SQL product and have been using it successfully  for many years.

The identical COBOL program and mysql database table function perfectly in the 32 bit world.

Using the 64 bit runtime all CONNECTS and INSERTS seem to be working fine.

However, in my case I am getting a DUPLICATE KEY error (an artifact of mysql where upper/lower case are equivalent). In the 32bit runtime this error is returned correctly. In the 64bit runtime the first few fields of the structure sql-error-description are loaded correctly but the rest are not. The value SQL-RETURN is 2701 (instead of expected 0 or 1) and the sql-ERRMSG field is empty. I have full Debug session memory dumps as proof. Not sure how to post those here.

The odbc test on Centos Linux works fine.

isql ncs t1adm topsecret


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Thank you for the reply Tom.

I am very familiar with the Instant SQL product and have been using it successfully  for many years.

The identical COBOL program and mysql database table function perfectly in the 32 bit world.

Using the 64 bit runtime all CONNECTS and INSERTS seem to be working fine.

However, in my case I am getting a DUPLICATE KEY error (an artifact of mysql where upper/lower case are equivalent). In the 32bit runtime this error is returned correctly. In the 64bit runtime the first few fields of the structure sql-error-description are loaded correctly but the rest are not. The value SQL-RETURN is 2701 (instead of expected 0 or 1) and the sql-ERRMSG field is empty. I have full Debug session memory dumps as proof. Not sure how to post those here.

The odbc test on Centos Linux works fine.

isql ncs t1adm topsecret


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

in fact the value of SQL-RETURN was 2301 not 2701


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

in fact the value of SQL-RETURN was 2301 not 2701


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Okay, you can upload files here, but it is a bit circuitous.  Select "Use rich formatting"  and you will find it on the "Options" tab.

This very well may be a  support incident...


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

It is beginning to look like that.  Test case please.


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

attached file magiq_err.tar.gz

RGPQRWM10.O     <<< COBOL object file
RGPQcreate_RGM10.sql  << sql script if rerun reqd
RGPQRWM10.L   << excerpt from the compiler listing
libisql_errs.txt     << details of my test run plus memory dump when error detected 32bit and 64bit


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Any progress on this?

Do you have enough information to investigate?


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Any progress on this?

Do you have enough information to investigate?


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Any progress on this?

Do you have enough information to investigate?


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

No progress yet.  Thanks for the test case though.


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Sadly, this test case won't run on my machine.  It really needs to be a lot simpler, and ideally we would want to see the source to the COBOL program.  The problem that I'm seeing is that when I run your program the following error message is produced:

COBOL procedure error 234 (no object file found). Error loading subprogram ncpast.

COBOL procedure error 204 (program not found) at line 2291 in program RGPQRWM10.0

What we like to see in a test case is a program with just the SQL statements necessary to recreate the error.


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Apologies for convoluted test case.

This version is entirely self contained.

the libisql_errs.txt on tar file has notes for running.

It uses the mysql "test" database which is usually present on install and require little security to run.


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Apologies for convoluted test case.

This version is entirely self contained.

the libisql_errs.txt on tar file has notes for running.

It uses the mysql "test" database which is usually present on install and require little security to run.


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Was this get case suitable?

Or should this matter be lodged as a support matter?


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

I'm looking at the test case.  In the original test case, you had a SQL statement that could be used to create the database, but I don't see that in this test case.  Does the COBOL program create the table, or should I use the database from the previous test case?

I don't know why you would expect to be getting a duplicate key here.


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Hi Mike

yes use the same sql table as last time.

I should have included that.

mysql generates a duplicate key for (e.g.) "AAA001" and "aaa001".

The test case no longer reads an external file - it simply attempts to write 4 records.

AAA001

BBB001

aaa001

bbb001

The last two will generate errors in the mysql world.

This is a simple way to generate an error - any other error generated produces the same corrupt error messages.


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Hi Mike

yes use the same sql table as last time.

I should have included that.

mysql generates a duplicate key for (e.g.) "AAA001" and "aaa001".

The test case no longer reads an external file - it simply attempts to write 4 records.

AAA001

BBB001

aaa001

bbb001

The last two will generate errors in the mysql world.

This is a simple way to generate an error - any other error generated produces the same corrupt error messages.


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Hi Mike

yes use the same sql table as last time.

I should have included that.

mysql generates a duplicate key for (e.g.) "AAA001" and "aaa001".

The test case no longer reads an external file - it simply attempts to write 4 records.

AAA001

BBB001

aaa001

bbb001

The last two will generate errors in the mysql world.

This is a simple way to generate an error - any other error generated produces the same corrupt error messages.


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

OK. Sorry, I was trying to squeeze looking into this between two other tasks.


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

Unfortunately, the compile gets an error opening NC/NCPERAL.C.

When creating a test case, it is usually the best plan to gather all the files that you think are needed, clean out the RMPATH environment variable, and then compile the program.  And then run the compiled program, with an empty RUNPATH environment variable.

The other problem with this test case is that it is too big.  If any error message produces the corrupt error message, then just have a simple program that produces any error message.  For example, for you description, trying to do a select on a non-existent table should do the trick.

I'm going to try and create a cut down test case using what you have given me, but the problem with me creating this test case is that I am now expending my time creating a test case, when I could be spending my time more productively helping another customer.


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

I was able to reproduce this problem using a test case here.  Please submit a support incident so that it will be a customer issue.


Using mysql driver

/lib64/libmyodbc5w.so

             SQL DESCRIBE ERROR  sql-Error-Description

           PERFORM WITH TEST AFTER UNTIL sql-EndOfData

              SQL DESCRIBE ERROR

                 sql-Error-Description

If an error, returns rubbish into sql-Error-Description and never returns SQL-RETURN condition sql-EndOfData.


#unixODBC
#RMCOBOL

I have tried logging in to do a support line thing but can't get there.

I have attached a much more succinct testcase.

This should compile.

the README.txt fairly simple.

My (failing) evaluation product is

RM/COBOL Runtime - Version 12.10 for Linux Intel 64-Bit.

RM/COBOL Runtime System issued to NCS Chameleon Ltd.

Configured for 10 users.

Evaluation Version - Valid Thru: 2015/10/06

NCS Chameleon Ltd

Copyright (c) 1985-2015 Micro Focus.  All rights reserved.

Registration Number: 6F-1000-77844-0010

Or perhaps send me some notes on how to load support line myself.

I simply could not log on.