473,394 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Convert IXF to CSV

Hi!

Is it possible to convert IXF files to some more readable format like CSV?
I'm asking this, because when I do IMPORT I sometimes get rejected rows. The
error says that there was a problem with row 1956 (for example). How do I
know what row is that, what data is in that row?

Best regards,
Kovi
--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Nov 27 '06 #1
6 11783
IXF files store definition of the table. So, create a new table while
importing and then export the data in DEL format.

Nov 27 '06 #2
Prasad wrote:
IXF files store definition of the table. So, create a new table while
importing and then export the data in DEL format.
Obviously, that won't work because the rejected rows wouldn't be imported.

Maybe exception tables will help?

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Nov 27 '06 #3
Knut Stolze wrote:
Prasad wrote:
>IXF files store definition of the table. So, create a new table while
importing and then export the data in DEL format.

Obviously, that won't work because the rejected rows wouldn't be imported.

Maybe exception tables will help?
Actually his suggestion gave an idea. I created a brand new table (no
primary keys, no unique indexes, ...) and imported the file into that
table. Then a simple SELECT statement gave the result I wanted. :)
Now the problem still persists.
The docs for the IMPORT command
(http://publib.boulder.ibm.com/infoce...c/r0008304.htm)
say that when you specify INSERT_UPDATE:
"INSERT_UPDATE
Adds rows of imported data to the target table, or updates existing rows
(of the target table) with matching primary keys."

But this is not the case if you have a unique index on the table. Is this a
bug in docs or in the IMPORT command itself?

Best regards,
Kovi

--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Nov 27 '06 #4
There is nothing wrong with the docs. INSERT_UPDATE does exactly what is
specified. If you have a unique index on the table that is not the
primary key, then inserts must have a new primary key AND satisfy the
uniqueness constraint of the unique index.

If your table does not have a primary key and has a single unique index,
then you can add the primary key using an ALTER TABLE statement. The
(new) primary key will use your existing unique index and will not
create another on the pk columns.

Take the suggestion made by Knut about using exception table when
loading and you will find the rejected rows there.

Phil Sherman

Gregor Kovac( wrote:
Knut Stolze wrote:
>Prasad wrote:
>>IXF files store definition of the table. So, create a new table while
importing and then export the data in DEL format.
Obviously, that won't work because the rejected rows wouldn't be imported.

Maybe exception tables will help?

Actually his suggestion gave an idea. I created a brand new table (no
primary keys, no unique indexes, ...) and imported the file into that
table. Then a simple SELECT statement gave the result I wanted. :)
Now the problem still persists.
The docs for the IMPORT command
(http://publib.boulder.ibm.com/infoce...c/r0008304.htm)
say that when you specify INSERT_UPDATE:
"INSERT_UPDATE
Adds rows of imported data to the target table, or updates existing rows
(of the target table) with matching primary keys."

But this is not the case if you have a unique index on the table. Is this a
bug in docs or in the IMPORT command itself?

Best regards,
Kovi
Nov 27 '06 #5
Hi!

Thanks for your reply, but I still think there is a bug somewhere. The docs
for INSERT_UPDATE never mention anything for unique keys. But you are
right, since IMPORT does INSERTs behind the scene, new rows have to comply
with foreighn keys, unique indexes, ... But none of this is mentioned in
the docs.
There is also nothing about exception tables with IMPORT command. I have
found that you can use them with LOAD command, but I don't want to use it,
because it puts tables into Set Integrity Pending state and then you have
to go and find the tables that are in that state and check them, ... A mess
if you ask me.

Best regards,
Kovi

Phil Sherman wrote:
There is nothing wrong with the docs. INSERT_UPDATE does exactly what is
specified. If you have a unique index on the table that is not the
primary key, then inserts must have a new primary key AND satisfy the
uniqueness constraint of the unique index.

If your table does not have a primary key and has a single unique index,
then you can add the primary key using an ALTER TABLE statement. The
(new) primary key will use your existing unique index and will not
create another on the pk columns.

Take the suggestion made by Knut about using exception table when
loading and you will find the rejected rows there.

Phil Sherman

Gregor Kovac( wrote:
>Knut Stolze wrote:
>>Prasad wrote:

IXF files store definition of the table. So, create a new table while
importing and then export the data in DEL format.
Obviously, that won't work because the rejected rows wouldn't be
imported.

Maybe exception tables will help?

Actually his suggestion gave an idea. I created a brand new table (no
primary keys, no unique indexes, ...) and imported the file into that
table. Then a simple SELECT statement gave the result I wanted. :)
Now the problem still persists.
The docs for the IMPORT command
(http://publib.boulder.ibm.com/infoce...c/r0008304.htm)
>say that when you specify INSERT_UPDATE:
"INSERT_UPDATE
Adds rows of imported data to the target table, or updates existing
rows
(of the target table) with matching primary keys."

But this is not the case if you have a unique index on the table. Is this
a bug in docs or in the IMPORT command itself?

Best regards,
Kovi
--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Nov 28 '06 #6
As far as I can remember, the message file that you use when doing imports
will always have a copy of the row that is rejected with the accompanying
messages as to why it was rejected (duplicate keys or wrong data type or
.....).
This file is a flat ASCII file so you should be able to scan it for the msgs
and rows.

I think exception tables are only used in the load command and can only hold
validly parsed rows. Those rows are the result of the inseted row with a
duplicate key that happens when the data is loaded in the table in pahase
one of the load. Phase two which maintains or builds indexes causes those
rows to be physically deleted from the table and then inserted in the
exception table. They are valid rows with duplicate keys on unique indexes.
Please note that those deletes and inserts are logged operations and if yoyu
have too many you will need more log space.

HTH' Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Gregor Kovac" <gr**********@mikropis.sia crit dans le message de news:
n7******************@news.siol.net...
Hi!

Is it possible to convert IXF files to some more readable format like CSV?
I'm asking this, because when I do IMPORT I sometimes get rejected rows.
The
error says that there was a problem with row 1956 (for example). How do I
know what row is that, what data is in that row?

Best regards,
Kovi
--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Dec 2 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Lauren Quantrell | last post by:
I have a stored procedure using Convert where the exact same Convert string works in the SELECT portion of the procedure but fails in the WHERE portion. The entire SP is listed below....
1
by: Logan X via .NET 247 | last post by:
It's official....Convert blows. I ran a number of tests converting a double to an integer usingboth Convert & CType. I *ASSUMED* that CType would piggy-back ontop of Convert, and that performance...
4
by: Eric Lilja | last post by:
Hello, I've made a templated class Option (a child of the abstract base class OptionBase) that stores an option name (in the form someoption=) and the value belonging to that option. The value is...
7
by: whatluo | last post by:
Hi, all I'm now working on a program which will convert dec number to hex and oct and bin respectively, I've checked the clc but with no luck, so can anybody give me a hit how to make this done...
3
by: Convert TextBox.Text to Int32 Problem | last post by:
Need a little help here. I saw some related posts, so here goes... I have some textboxes which are designed for the user to enter a integer value. In "old school C" we just used the atoi function...
7
by: patang | last post by:
I want to convert amount to words. Is there any funciton available? Example: $230.30 Two Hundred Thirty Dollars and 30/100
4
by: Edwin Knoppert | last post by:
In my code i use the text from a textbox and convert it to a double value. I was using Convert.ToDouble() but i'm used to convert comma to dot. This way i can assure the text is correct. However...
1
by: johnlim20088 | last post by:
Hi, Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in...
6
by: Ken Fine | last post by:
This is a basic question. What is the difference between casting and using the Convert.ToXXX methods, from the standpoint of the compiler, in terms of performance, and in other ways? e.g. ...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.