Connecting to DB2/400 using GCC on Linux-PowerPC - linux

After a lot research, I decided to ask the question here, therefore, I have not found the answer of how I can do this.
I have a system written in C/C ++ which was designed for Linux PowerPC64 BE ( at now, I'm using Debian ) servers, and I need to connect this system to an IBM DB2/400 database, my first choice was to use unixODBC, after searching I saw the need to use a lib. for db2, but I did not find this lib, and then I did not find any other alternatives on how to make that connection.
So, how I can make this connection ?

Linux ODBC drivers for Db2 for IBM i are available in two flavors...
Assuming you have a license for "Client Access", of which the most current incarnation is known as Access Client Solutions (ACS). The Linux ODBC driver is in the Linux Application Package.
IBM also offers a stand-a-lone product, Db2 Connect which provides connectivity to Db2 for Z/OS, DB2 for i, and Db2 for LUW.
For C/C++ you should be good with either. But for instance, the Python Db2 package expects Db2 Connect and doesn't work with the ACS Linux driver.

Related

InterBase ODBC driver for Linux

I'm trying to find a free ODBC driver for Linux to connect my application to an Interbase 2017 database. Tried everything I could think of but still luck. Both the server and the client are using a 64-bit based architecture.
I tried a few firebird ODBC drivers. I managed to use them to connect to firebird databases, but they do not work with the newer versions of Interbase.
I managed to connect to the database by using a paid ODBC driver and it is working, but as long the project is personal and not commercial, I prefer to use a free driver.

The db2prereqcheck utility was unable to determine the Linux distribution level

I am working on Linux Mint and when I tried installing IBM DB2 following the steps in below link,
https://www.ibm.com/support/knowledgecenter/SSEPGG_11.5.0/com.ibm.db2.luw.qb.server.doc/doc/t0008875.html
I got this error in the step when I check installation requirements
DBT3505E The db2prereqcheck utility was unable to determine the Linux distribution level.
What to do?
Linux Mint is not a supported operating system for Db2.
If you dig hard enough, starting with this document, you can determine the supported operating systems:
https://www.ibm.com/support/pages/system-requirements-ibm-db2-linux-unix-and-windows
For Db2 v11.5, the supported Linux operating systems are RHEL7.5, SLES12SP3, or Ubuntu 16.04.
Db2 is "not supported" on Linux Mint. What does that mean?
It means that the paid defect-support channel for Db2 will likely reject requests for help for Db2 on Linux Mint. They will ask you to first recreate the symptom on a supported distribution. That allows them to investigate on a supported distro.
But 'not supported' does not mean that Db2 will not work. Instead, you might need to do additional pre-requsites installation or configuration work, or other troubleshooting activities to solve issues.
For example, Db2 is not supported by the IBM paid defect support when Db2 runs on Centos or Fedora distributions. But Db2 runs happily on these distributions as long as you know what you are doing , and always install from the latest-fixpack-server-build image of Db2 (but never the GA build).
So 'not supported' means that when it goes wrong, it's up to you to find a solution and the paid channel for Db2-defect-support won't help you.
Most companies value their data and want some kind of support so most companies will use a supported distribution. But if you are in a non-production or development environment, and if you have the time and competence and patience to do troubleshooting then you can make progress and learn stuff.
As regards the specific, symptom DBT3505E , there is already an existing answer , always search for the symptom-code first on stackoverflow!

Linux ARSystem data connection

I deal with an ARSystem and I've been accessing the arserver data by ODBC communication using the AR System driver for Windows plataform. I would like to do the same on a linux plataform. My specifications to do the connection at the ODBC Manager Setup are:
Data Source Name
AR Server
User name
Password
(checked choices)
Replace '.' in object names
Use underscores
Is it possible? How can I do that?
Regards,
I don't believe there is an ARSystem ODBC driver for Linux. You could use an ODBC-ODBC Bridge to get at it from Linux.
Have you considered the JDBC Driver for Remedy or ARSPerl if it has to run in a shell. Both of those solutions can be run on Windows as well.

Connect erlang client to oracle

Does anyone know how to connect to oracle from an erlang client in linux? I guess ODBC drivers are required.
According to the Erlang documentation ODBC is the way to go.
There is an Erlang ODBC API which "should run on all Unix dialects including Linux.... But currently it is only tested for Solaris, Windows 2000, Windows XP and NT". Find out more.
There are ODBC drivers for Linux. If you're lucky your distro will already have one installed. Find out more.
==== Answer may be very useful if on Windows, but may contain helpful info for Linux as well =====Now, First of all, we need to download an oracle client or oracle Database itself and install it from here: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html. Oracle installs and creates a folder called oracle (on windows). Inside this folder, you will find its $HOME folder normally: C:\oracle\product\10.2.0\db_1. If you are on windows therefore, when you access the ODBC Configurations by reading this: http://ozinisle.blogspot.com/2011/10/configuring-odbc-connection-for-oracle.html then you will create a new Data Source Name (DSN) of your choice. The steps roughly are as follows: 1. Select System DSN2. Create New Data Source3. Scroll Down to select Oracle in OraDB{Vsn}_home14. Specify the Username (UID), Password5. Note down the Driver name you have selected, Note down the Data Source Name you have entered.6. Test the connection and make sure windows says that its fine.
Now, after this, we go to erlang side. Look at this module, its should kick start you in communicating with oracle.
-module(oracle_client).
-compile(export_all).
-define(CONNECT_OPTIONS,[
{auto_commit,on},
{scrollable_cursors, off}
]).
-define(CONNECT_STRING,"DSN=data_source;UID=uid;PWD=password;DRIVER=Oracle in OraDb10g_home1").connect()->
odbc:start(),
try odbc:connect(?CONNECT_STRING,?CONNECT_OPTIONS) of
{ok,ConnObject} -> {true,ConnObject};
Any -> {error,Any}
catch
E:E2 -> {exception,{E,E2}}
end.
send_sql(ConnObject, SQLQuery)-> odbc:sql_query(ConnObject, SQLQuery).
Erlang ODBC server must be running first. Erlang ODBC will ask you for a connection string and options. In the options first of all note that most Oracle drivers will need those scrollable cursors off. Then, in the connection string, you will be required to enter valid UID (username), password, DSN (Data source name) and the driver name, all these exactly the way you created the DSN in windows ODBC connection in the steps above.That should be okay. Note that you should stick to oracle drivers them selves and avoid third party ODBC Oracle drivers. I have, from experience suffered from using other third party drivers because after say, 10 million connections, the driver starts asking for money/License and blocks your traffic from reaching oracle DB.Let me know in case you get any challenges. The module above is a bit rough, do not use as is because its just a shell testing module, otherwise you will need say a gen_server which will hold the Connection Object so that other processing just keep communicating with it. As long as you are successful in setting up the Data Source Name with the installed Oracle DB or client on your machine, then this module will help you otherwise most challenges are in setting up the ODBC Connection.=== Linux === For Linux, i guess you need to get odbc libraries like Easy Soft ODBC Drivers, or UnixODBC. Then try to set it up as we did with windows above, and then use the Erlang module i have provided above. It should still work. I am afraid i have always connected to oracle from Windows and NOT Linux due to many challenges in setting up and configuring ODBC libraries (give it a shot, you may be succesful in setting up Unix ODBC or Easy Soft ODBC libraries), Otherwise, the Erlang part of it is sorted out.

What database tool to use on Linux to read an as/400 database?

From Linux (Red Hat dist), we need to read an AS400 database. We have the ODBC driver to connect, what's the best query tool?
Kexi calls itself "Microsoft Access for Linux", and it's pretty good, but the ODBC driver isn't quite there yet.
A similar program is OpenOffice.org BASE. IMO, Kexi is a better overall product, but Base has an ODBC driver.
Lighter-weight graphical tools for databases with ODBC drivers include Datakiosk and Tora (which, despite its name, works with more than just Oracle).
What's "best"? Depends on your tastes and your needs. This is by no means an all-inclusive list.
Eclipse and Quantum DB

Resources