Connect IBM AS400 DB2 data base

8 replies [Last post]
30pistons
Offline
Last seen: 1 year 9 weeks ago
Title:
Joined: 15 Apr 2013
Posts: 6
Hi forum How I can to connect the data base on subject? I would like to use this connection to create some reports and to do other function in a Calc document. Regards
oweng
oweng's picture
Offline
Last seen: 5 days 10 hours ago
Title: ==Moderator==
Joined: 26 Jan 2012
Posts: 3281
more detail
I can’t help you, however you may need to provide more detail on what exactly it is you are trying to achieve and how you are wanting to go about this e.g., type of network connection, protocol connection, database format, types of available file formats, etc. The title makes it sound like you are wanting to use LO Base to make use of a remote database connection (or something like that). I would have thought that the usual way for a PC client to make use of data on a mainframe / midrange computer is to export the data to a CSV/XML or similar file and then import that data into the PC client software. I could be completely wrong about that.

frofa / eremmel I think this one is for you.

30pistons
Offline
Last seen: 1 year 9 weeks ago
Title:
Joined: 15 Apr 2013
Posts: 6
Connect IBM AS400 data base
Hi Oweng, thanks for your attention. I would like recreate a job done in MS Office where after creating an ODBC connection, through the development of VB code, basically I read the data from some tables AS400 and I diplay they on the worksheet. But I also write data from the worksheet to the data base. It’s a kind of a little ETL with some functions for the user. The IBM server is on a corporate network, I already used a connection protocol driver JODBC on some Java program developed on Eclipse environment.
PeterRoots
Offline
Last seen: 2 years 29 weeks ago
Title: ★★★★★
Joined: 25 Oct 2011
Posts: 941
You don’t mention what
You don’t mention what database you are trying to connect to but as you mention you used ODBC to connect with MSO you should be able to do the same with LO as Base has ODBC drivers available for it by default. As you would be connected directly to the remote database you are able (permissions on the server permitting) to both read and write data. Base also supports JDBC if that is your perference
Linux Mint 15 LibreOffice 4.1.1.2 : OpenSUSE 12.3 LibreOffice 4.0.3
30pistons
Offline
Last seen: 1 year 9 weeks ago
Title:
Joined: 15 Apr 2013
Posts: 6
More mentions
Hi Peter I specify in the initial subject that the data base that I would like to connect is an IBM AS400. Some informations about it on can be find here: http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.dc.doc/dc/r_jdbcdrivers.htm I would like to understand the steps to: 1. connect the data base 2. to read records and fields data from some tables with query composed by my Java code 3. to write this informations in a Calc datasheet. Regards
PeterRoots
Offline
Last seen: 2 years 29 weeks ago
Title: ★★★★★
Joined: 25 Oct 2011
Posts: 941
You did indeed say you were
You did indeed say you were connecting to an IBM AS400 – this is a server not a database. Your links suggest the server is running IBM DB2 which is your database.

I have never used IBM DB2 and don’t currently have a suitable database to connect to – I did this once, a very long time ago so can’t remember all the details.
JDBC may be better than ODBC, certainly on a Linux system you need to install the unixODBC driver to use ODBC, but I don’t think you need anything extra (beyond Java) to use JDBC. I don’t know about Windows or MacOS (you don’t mention what OS you are using?)
If you work through the database wizard, that starts when you open Base, that should get you started.

Linux Mint 15 LibreOffice 4.1.1.2 : OpenSUSE 12.3 LibreOffice 4.0.3
30pistons
Offline
Last seen: 1 year 9 weeks ago
Title:
Joined: 15 Apr 2013
Posts: 6
Hi Peter thanks for the
Hi Peter thanks for the suggestion about the subject, I just changed it. I think to work on a linux OS (Ubntu or Mint) but if is possible I would like to have an independent job from OS. If I start open Base it suggest some kind of data bases but no IBM DB2: how can I add it? Regards
PeterRoots
Offline
Last seen: 2 years 29 weeks ago
Title: ★★★★★
Joined: 25 Oct 2011
Posts: 941
you need to connect using
you need to connect using JDBC or ODBC – these drivers are what connect to the database probably something likd jdbc:servername/database_name but have a look in the Base help file
Linux Mint 15 LibreOffice 4.1.1.2 : OpenSUSE 12.3 LibreOffice 4.0.3
oweng
oweng's picture
Offline
Last seen: 5 days 10 hours ago
Title: ==Moderator==
Joined: 26 Jan 2012
Posts: 3281
split database / access info
This thread may be helpful. Your access method will vary according to driver (as shown here). Note that what you are trying to do is termed a “split database” setup i.e., DB2 backend with LO Base as the front end. There is a lot of information is this thread about doing this. I imagine you will then need some method of linking a Calc spreadsheet to Base in order to allow your charting of the data. I would imagine the Extract / Transform / Load (ETL) operation will occur within Base rather than involving Calc, but again I am not clear on these last two points.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.