Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Importing a tab delimted text file?

293 views
Skip to first unread message

Francis Fang

unread,
Oct 4, 1996, 3:00:00 AM10/4/96
to

Hi folks,

Is there an existing utility or script to take a tab delimited text file
and import its contents into Informix Online? The text file originates
from an old FileMaker database on a Mac.

I've looked through the Informix stuff and can't find anything on
importing data from outside source short of entering the data manually
or having to write a shell script.

Our setup includes Informix 4.10.UE1 running on a DECsystem 5000
(Ultrix).

Thanks in advance!

Frank.

Billy Wheeler

unread,
Oct 5, 1996, 3:00:00 AM10/5/96
to

> Is there an existing utility or script to take a tab delimited text file
> and import its contents into Informix Online? The text file originates
> from an old FileMaker database on a Mac.

You can try setting the environment variable

DBDELIMITER="\t"

and then using dbload or the LOAD command in ISQL/DBAccess.

Or you can vi your datafile and try

:1,$s/<tab>/|/g
(where <tab> means press the TAB key).

Then save the file and dbload it. You won't need to set DBDELIMITER.

HTH.

> Our setup includes Informix 4.10.UE1 running on a DECsystem 5000
> (Ultrix).

Whooo! State of the art! :-)

--
Ciao,

Billy

+------------------------------------------------------------------------------+
| Billy Wheeler Junior Programmer / Director The West Solutions Group |
+------------------------------------------------------------------------------+
| Oracle isn't the answer. Oracle is the question, and the answer is "no". |
+------------------------------------------------------------------------------+

Malcolm Weallans

unread,
Oct 7, 1996, 3:00:00 AM10/7/96
to

I have done this on a number of occasions. My preferred method is to use
an editor to replace TAB with comma or the pipe symbol. The file can
then be imported with DBLOAD or the SQL LOAD command. In theory the edit
operation should not be necessary but I have had difficulty on some
platforms in setting DBDELIMITER to TAB.

> Hi folks,


>
> Is there an existing utility or script to take a tab delimited text file
> and import its contents into Informix Online? The text file originates
> from an old FileMaker database on a Mac.
>

> I've looked through the Informix stuff and can't find anything on
> importing data from outside source short of entering the data manually
> or having to write a shell script.
>

> Our setup includes Informix 4.10.UE1 running on a DECsystem 5000
> (Ultrix).
>

> Thanks in advance!
>
> Frank.


Malcolm Weallans
Online Database Consultancy
Phone 01628-72154
Fax 01628-37463
CIX - onlinedbc

CSC CIS

unread,
Oct 7, 1996, 3:00:00 AM10/7/96
to

Francis

Try using this filter to convert your tab-delimited files to pipe-delimited files:
sed -e 's/<tab char>/|/g' \
-e 's/$/|/' $1
where <tab char> is a tab and $1 is your data file. Then use LOAD FROM datafilename INSERT INTO tablename to get the data into Informix.

Hope this helps

Sujit Pal
DBA, Computer Sciences Corp.

----------
From: Francis Fang[SMTP:ff...@grover.printing.uiowa.edu]
Sent: Friday, October 04, 1996 12:25 PM
To: inform...@rmy.emory.edu
Subject: Importing a tab delimted text file?

Francis Fang

unread,
Oct 7, 1996, 3:00:00 AM10/7/96
to

First of all, thank you thank you thank you. A number of people have
reponded to my question regarding Importing text files with tab
delimiters into Informix.

I, still being entrenched in the world of PCs had looked in the manuals
for the index word "import" and never thought to look under "load".
Apparently, Informix does have many such utilities - dbaccess, dbload,
dbimport not to mention the simply LOAD command under ISQL.

Thanks again folks.

Credits : Billy Wheeler, Bill Enis, John Shu, & Joanne Dority.
Hope I didn't miss anyone.


The original post was :

0 new messages