473,902 Members | 5,194 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 11901
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_UPD ATE
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_UPD ATE
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_UPDA TE
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**********@m ikropis.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
7310
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. Specifically, I have a problem with this portion in the WHERE clause: DATEADD(Day,tblMyEventTableName.ReminderDays, @DateNow) Between CONVERT(smalldatetime,str(DATEPART(Month, @DateNow)+1) + '/' + str(DATEPART(Day, tblMyEventTableName.TaskDateTime)) + '/'...
1
1787
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 would be identical. I was 100% incorrect. The code below produces the results: CType Took: 0.2187528 seconds. Convert Took: 12.187656 seconds.
4
3647
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 of the type the object is instantiated with. In my test program I have Option<std::string> and Option<long>. Here's the code for OptionBase and Option along with a small helper function. In the code are comments describing my problem, look closely...
7
7134
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 without strtol or s/printf function. Thanks, whatluo.
3
10305
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 and there you have it. So I enquired and found the Convert class with it's promising ToInt32 method, great... but it doesn't work. The thing keeps throwing Format Exceptions all over the place. What is the "C#" way to do this??? code int wmin,...
7
29267
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
4532
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 it seems this convert is determined by the local settings and comma is indeed used as decimal separator. Is there another way to convert a dotted value to a double variable? Like 1234.5 and not 1234,5
1
3612
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 some files and work on it. Let say, I want add new page to web project named websiteOrder.sln, i will open websiteOrder.sln in my local computer, connected to websiteOrder.sln located in Visual Source Safe 6.0(source safe located in another...
6
4286
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. this.ContentID = (int)ci.Conid; vs. this.ContentID = Convert.ToInt32(ci.Conid); I tend to use the latter form because it seems more descriptive to me, but it would be good to know what's best practice. I'm guessing those methods
0
10803
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 inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not a new concept, there is a concept called Steganography which enables to conceal your secret...
0
9845
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11279
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10872
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10981
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9675
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5893
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4307
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3323
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.