Skip to main content

Connecting to Cobol Files using Linked Server in SQL Server

  • October 23, 2015
  • 8 replies
  • 1 view

Dominique Sacre
Forum|alt.badge.img+2
I need to read some Cobol data files through a linked server in sql server.
I have followed the steps described here, just that I used version 8.01.02 of the Acucorp AcuXDBC ODBC drivers.
 
I have also created the Linked server in SQL, but I am not able to query the files.
When I try to expand the tables group in the Lined server I get an error saying:
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server.
 
I tried to see maybe i need to create some catalogs using xdbcutil -d D:\\XDBCDataFiles\\INK\\xdbcVIX -x D:\\XDBCDataFiles\\INK\\xfd -v -a post
but I got: Table Post is already defined.
I have used the same files before with a linked server on another machine and it was ok.
My cfg file that I specified in ODBC looks like this (I have removed the commented parts):
dictsource "D:/XDBCDataFiles/INK/xdbcVIX" 
file_prefix ";D:/XDBCDataFiles/INK/xdbcVIX;D:/XDBCDataFiles/INK/dataFiles" 
invalid_numeric_data zero
max_files 256

max_locks 4098

locks_per_file 4098

v_buffers 256
What is it that I must do to make it work, so I can be able to do something like this: select * from openquery(linked_server, 'select * from post')?

#AcuXDBC
#SQL
#ODBC
#linkedserver

8 replies

Stephen Hjerpe
  • Participating Frequently
  • October 23, 2015
I need to read some Cobol data files through a linked server in sql server.
I have followed the steps described here, just that I used version 8.01.02 of the Acucorp AcuXDBC ODBC drivers.
 
I have also created the Linked server in SQL, but I am not able to query the files.
When I try to expand the tables group in the Lined server I get an error saying:
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server.
 
I tried to see maybe i need to create some catalogs using xdbcutil -d D:\\XDBCDataFiles\\INK\\xdbcVIX -x D:\\XDBCDataFiles\\INK\\xfd -v -a post
but I got: Table Post is already defined.
I have used the same files before with a linked server on another machine and it was ok.
My cfg file that I specified in ODBC looks like this (I have removed the commented parts):
dictsource "D:/XDBCDataFiles/INK/xdbcVIX" 
file_prefix ";D:/XDBCDataFiles/INK/xdbcVIX;D:/XDBCDataFiles/INK/dataFiles" 
invalid_numeric_data zero
max_files 256

max_locks 4098

locks_per_file 4098

v_buffers 256
What is it that I must do to make it work, so I can be able to do something like this: select * from openquery(linked_server, 'select * from post')?

#AcuXDBC
#SQL
#ODBC
#linkedserver

Did you set the user name and password, like you did in this older post community.microfocus.com/.../11706.aspx


Dominique Sacre
Forum|alt.badge.img+2
I need to read some Cobol data files through a linked server in sql server.
I have followed the steps described here, just that I used version 8.01.02 of the Acucorp AcuXDBC ODBC drivers.
 
I have also created the Linked server in SQL, but I am not able to query the files.
When I try to expand the tables group in the Lined server I get an error saying:
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server.
 
I tried to see maybe i need to create some catalogs using xdbcutil -d D:\\XDBCDataFiles\\INK\\xdbcVIX -x D:\\XDBCDataFiles\\INK\\xfd -v -a post
but I got: Table Post is already defined.
I have used the same files before with a linked server on another machine and it was ok.
My cfg file that I specified in ODBC looks like this (I have removed the commented parts):
dictsource "D:/XDBCDataFiles/INK/xdbcVIX" 
file_prefix ";D:/XDBCDataFiles/INK/xdbcVIX;D:/XDBCDataFiles/INK/dataFiles" 
invalid_numeric_data zero
max_files 256

max_locks 4098

locks_per_file 4098

v_buffers 256
What is it that I must do to make it work, so I can be able to do something like this: select * from openquery(linked_server, 'select * from post')?

#AcuXDBC
#SQL
#ODBC
#linkedserver

I tried with and without, no luck. I tried to actually run a query in SQL Server Management Studio and I got another error: The specified DSN contains an architecture mismatch between the Driver and Application.

I believe this could be because I installed a 64bit SQL Server. Can I get the 64 bit version of the ODBC drivers from somewhere?


Dominique Sacre
Forum|alt.badge.img+2
I need to read some Cobol data files through a linked server in sql server.
I have followed the steps described here, just that I used version 8.01.02 of the Acucorp AcuXDBC ODBC drivers.
 
I have also created the Linked server in SQL, but I am not able to query the files.
When I try to expand the tables group in the Lined server I get an error saying:
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server.
 
I tried to see maybe i need to create some catalogs using xdbcutil -d D:\\XDBCDataFiles\\INK\\xdbcVIX -x D:\\XDBCDataFiles\\INK\\xfd -v -a post
but I got: Table Post is already defined.
I have used the same files before with a linked server on another machine and it was ok.
My cfg file that I specified in ODBC looks like this (I have removed the commented parts):
dictsource "D:/XDBCDataFiles/INK/xdbcVIX" 
file_prefix ";D:/XDBCDataFiles/INK/xdbcVIX;D:/XDBCDataFiles/INK/dataFiles" 
invalid_numeric_data zero
max_files 256

max_locks 4098

locks_per_file 4098

v_buffers 256
What is it that I must do to make it work, so I can be able to do something like this: select * from openquery(linked_server, 'select * from post')?

#AcuXDBC
#SQL
#ODBC
#linkedserver

I tried with and without, no luck. I tried to actually run a query in SQL Server Management Studio and I got another error: The specified DSN contains an architecture mismatch between the Driver and Application.

I believe this could be because I installed a 64bit SQL Server. Can I get the 64 bit version of the ODBC drivers from somewhere?


Stephen Hjerpe
  • Participating Frequently
  • October 26, 2015
I need to read some Cobol data files through a linked server in sql server.
I have followed the steps described here, just that I used version 8.01.02 of the Acucorp AcuXDBC ODBC drivers.
 
I have also created the Linked server in SQL, but I am not able to query the files.
When I try to expand the tables group in the Lined server I get an error saying:
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server.
 
I tried to see maybe i need to create some catalogs using xdbcutil -d D:\\XDBCDataFiles\\INK\\xdbcVIX -x D:\\XDBCDataFiles\\INK\\xfd -v -a post
but I got: Table Post is already defined.
I have used the same files before with a linked server on another machine and it was ok.
My cfg file that I specified in ODBC looks like this (I have removed the commented parts):
dictsource "D:/XDBCDataFiles/INK/xdbcVIX" 
file_prefix ";D:/XDBCDataFiles/INK/xdbcVIX;D:/XDBCDataFiles/INK/dataFiles" 
invalid_numeric_data zero
max_files 256

max_locks 4098

locks_per_file 4098

v_buffers 256
What is it that I must do to make it work, so I can be able to do something like this: select * from openquery(linked_server, 'select * from post')?

#AcuXDBC
#SQL
#ODBC
#linkedserver

You'll need to contact Sales to get the 64 bit AcuXDBC.


Dominique Sacre
Forum|alt.badge.img+2
I need to read some Cobol data files through a linked server in sql server.
I have followed the steps described here, just that I used version 8.01.02 of the Acucorp AcuXDBC ODBC drivers.
 
I have also created the Linked server in SQL, but I am not able to query the files.
When I try to expand the tables group in the Lined server I get an error saying:
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server.
 
I tried to see maybe i need to create some catalogs using xdbcutil -d D:\\XDBCDataFiles\\INK\\xdbcVIX -x D:\\XDBCDataFiles\\INK\\xfd -v -a post
but I got: Table Post is already defined.
I have used the same files before with a linked server on another machine and it was ok.
My cfg file that I specified in ODBC looks like this (I have removed the commented parts):
dictsource "D:/XDBCDataFiles/INK/xdbcVIX" 
file_prefix ";D:/XDBCDataFiles/INK/xdbcVIX;D:/XDBCDataFiles/INK/dataFiles" 
invalid_numeric_data zero
max_files 256

max_locks 4098

locks_per_file 4098

v_buffers 256
What is it that I must do to make it work, so I can be able to do something like this: select * from openquery(linked_server, 'select * from post')?

#AcuXDBC
#SQL
#ODBC
#linkedserver

I installed a 32 bit version of SQL Server. When I am trying to run the query, i get: License file 'C:/Program Files (x86)/Acucorp/Acucbl812/AcuGT/bin/xvision.alc' inaccessible".

I used activator.exe to add the license keys, but i can't find any .alc file. Is there any other way to add this file?


Dominique Sacre
Forum|alt.badge.img+2
I need to read some Cobol data files through a linked server in sql server.
I have followed the steps described here, just that I used version 8.01.02 of the Acucorp AcuXDBC ODBC drivers.
 
I have also created the Linked server in SQL, but I am not able to query the files.
When I try to expand the tables group in the Lined server I get an error saying:
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server.
 
I tried to see maybe i need to create some catalogs using xdbcutil -d D:\\XDBCDataFiles\\INK\\xdbcVIX -x D:\\XDBCDataFiles\\INK\\xfd -v -a post
but I got: Table Post is already defined.
I have used the same files before with a linked server on another machine and it was ok.
My cfg file that I specified in ODBC looks like this (I have removed the commented parts):
dictsource "D:/XDBCDataFiles/INK/xdbcVIX" 
file_prefix ";D:/XDBCDataFiles/INK/xdbcVIX;D:/XDBCDataFiles/INK/dataFiles" 
invalid_numeric_data zero
max_files 256

max_locks 4098

locks_per_file 4098

v_buffers 256
What is it that I must do to make it work, so I can be able to do something like this: select * from openquery(linked_server, 'select * from post')?

#AcuXDBC
#SQL
#ODBC
#linkedserver

You need to use an account that has sufficient privilege to write in the Program Files (x86) branch.  Try right clicking on activator.exe and select 'Run as administrator'.


Dominique Sacre
Forum|alt.badge.img+2
I need to read some Cobol data files through a linked server in sql server.
I have followed the steps described here, just that I used version 8.01.02 of the Acucorp AcuXDBC ODBC drivers.
 
I have also created the Linked server in SQL, but I am not able to query the files.
When I try to expand the tables group in the Lined server I get an error saying:
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server.
 
I tried to see maybe i need to create some catalogs using xdbcutil -d D:\\XDBCDataFiles\\INK\\xdbcVIX -x D:\\XDBCDataFiles\\INK\\xfd -v -a post
but I got: Table Post is already defined.
I have used the same files before with a linked server on another machine and it was ok.
My cfg file that I specified in ODBC looks like this (I have removed the commented parts):
dictsource "D:/XDBCDataFiles/INK/xdbcVIX" 
file_prefix ";D:/XDBCDataFiles/INK/xdbcVIX;D:/XDBCDataFiles/INK/dataFiles" 
invalid_numeric_data zero
max_files 256

max_locks 4098

locks_per_file 4098

v_buffers 256
What is it that I must do to make it work, so I can be able to do something like this: select * from openquery(linked_server, 'select * from post')?

#AcuXDBC
#SQL
#ODBC
#linkedserver

Getting closer :).

Now I got:

OLE DB provider "MSDASQL" for linked server "xdbc_testrem" returned message "[TOD][ODBC Driver]DLLLOAD: acuxdbc04, The specified module could not be found.

Where is this acuxdbc04? I installed this:


Dominique Sacre
Forum|alt.badge.img+2
I need to read some Cobol data files through a linked server in sql server.
I have followed the steps described here, just that I used version 8.01.02 of the Acucorp AcuXDBC ODBC drivers.
 
I have also created the Linked server in SQL, but I am not able to query the files.
When I try to expand the tables group in the Lined server I get an error saying:
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server.
 
I tried to see maybe i need to create some catalogs using xdbcutil -d D:\\XDBCDataFiles\\INK\\xdbcVIX -x D:\\XDBCDataFiles\\INK\\xfd -v -a post
but I got: Table Post is already defined.
I have used the same files before with a linked server on another machine and it was ok.
My cfg file that I specified in ODBC looks like this (I have removed the commented parts):
dictsource "D:/XDBCDataFiles/INK/xdbcVIX" 
file_prefix ";D:/XDBCDataFiles/INK/xdbcVIX;D:/XDBCDataFiles/INK/dataFiles" 
invalid_numeric_data zero
max_files 256

max_locks 4098

locks_per_file 4098

v_buffers 256
What is it that I must do to make it work, so I can be able to do something like this: select * from openquery(linked_server, 'select * from post')?

#AcuXDBC
#SQL
#ODBC
#linkedserver

Make sure your PATH environment variable includes the relevant AcuGT\\bin directory. You'll also need the GENESIS_HOME variable pointing to the AcuGT directory:

PATH: C:/Program Files (x86)/Acucorp/Acucbl812/AcuGT/bin;(other existing entries...)
GENESIS_HOME: C:/Program Files (x86)/Acucorp/Acucbl812/AcuGT