dbTalk Databases Forums  

Flimport Mystery

comp.databases.paradox comp.databases.paradox


Discuss Flimport Mystery in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JoeSpareBedroom
 
Posts: n/a

Default Flimport Mystery - 01-16-2007 , 10:43 AM






Using PdoxDOS 4.5, trying to import a text file with 13000 lines in nice,
orderly columns, 95 chars per line. This is not rocket surgery - I've been
doing this for years. This time, however, I run the import and get this:

Action = Overwrite
0 records processed
Import Complete
1 Records Imported
0 Errors Detected

Press any key to continue....

Checking the resulting table, I find just one record. Makes no sense, but
here's a clue. If I open the source text file (in WinEdit) and go to the end
of any line (using the END key), I find I'm at column 96. But, if I use
Flimport to check record length, it shows a result of 32500. Very odd. Any
thoughts on this issue?



Reply With Quote
  #2  
Old   
Ed Nash
 
Posts: n/a

Default Re: Flimport Mystery - 01-16-2007 , 11:21 AM






JoeSpareBedroom wrote:
Quote:
Flimport to check record length, it shows a result of 32500. Very odd. Any
thoughts on this issue?
Is there a CR/LF (hex 0D 0A) pair at the end of each line?


Reply With Quote
  #3  
Old   
JoeSpareBedroom
 
Posts: n/a

Default Re: Flimport Mystery - 01-16-2007 , 11:27 AM



"Ed Nash" <ask.me (AT) specifically (DOT) pls> wrote

Quote:
JoeSpareBedroom wrote:
Flimport to check record length, it shows a result of 32500. Very odd.
Any thoughts on this issue?

Is there a CR/LF (hex 0D 0A) pair at the end of each line?
Not that I can see in WinEdit. However:

- If I open the text file in Word using the "Show All" option, there's a
paragraph mark at the end of each line.

- If I copy the text from the offending file into a new file, the import
works. It's a minor extra step, but still, I'm curious.




Reply With Quote
  #4  
Old   
Ed Nash
 
Posts: n/a

Default Re: Flimport Mystery - 01-16-2007 , 12:29 PM



JoeSpareBedroom wrote:
Quote:
Not that I can see in WinEdit. However:

- If I open the text file in Word using the "Show All" option, there's a
paragraph mark at the end of each line.

- If I copy the text from the offending file into a new file, the import
works. It's a minor extra step, but still, I'm curious.


One other thought... some programs that create text files put an
end-of-file marker (non-visible) after the last CR/LF. My experience is
that Paradox doesn't like it. I suspect that when you copy/paste you
are not bringing along that EOF byte. Try deleting it with a hex editor
or even using the backspace key after opening the file in Notepad. Then
re-save and re-import.


Reply With Quote
  #5  
Old   
Michael Kennedy
 
Posts: n/a

Default Re: Flimport Mystery - 01-16-2007 , 02:51 PM



As Ed has covered, it's most likely that each line is not ending with the
CR/LF pair (Hex 0D/0A). You should run a HEX viewer to check the original
file - any other "editor" may lie to you - some will automatically repair a
lone CR, or a lone LF, or a reversed LF/CR, to a "proper" CR/LF pair, and
then you'll not be any wiser at the end.

If it's a CR/LF issue, then you'll need to trace back to the source of this
file - I expect someone there took a wrong option... or prepared the file
for a UNIX platform... or...

Ed has also covered the EOF issue...

Finally, all the PDox "Import" routines - that I'm familiar with - are not
very smart on CSV files, where the field separator char (usually ,) and/or
the field delimiter char (usually ") are embedded within string fields.

- Mike

"Ed Nash" <ask.me (AT) specifically (DOT) pls> wrote

Quote:
JoeSpareBedroom wrote:
Not that I can see in WinEdit. However:

- If I open the text file in Word using the "Show All" option, there's a
paragraph mark at the end of each line.

- If I copy the text from the offending file into a new file, the import
works. It's a minor extra step, but still, I'm curious.

One other thought... some programs that create text files put an
end-of-file marker (non-visible) after the last CR/LF. My experience is
that Paradox doesn't like it. I suspect that when you copy/paste you are
not bringing along that EOF byte. Try deleting it with a hex editor or
even using the backspace key after opening the file in Notepad. Then
re-save and re-import.



Reply With Quote
  #6  
Old   
JoeSpareBedroom
 
Posts: n/a

Default Re: Flimport Mystery - 01-16-2007 , 03:00 PM



This was a fixed length file, so delimiters weren't the problem, although I
know what you mean. The files I get often have commas in the product
descriptions. Since they serve no useful purpose, in terms of legibility, I
do a search/replace and turn them into spaces.

As far the source of the file, you're probably correct about the "wrong
turn". I have no control over what the vendors send us, unfortunately. A few
of the companies have had consistent procedures in place for 10 years, as
evidenced by the age of my flimport spec files. Others think it's fun to
change their formats every 3 months.



"Michael Kennedy" <Info (AT) KennedySoftware (DOT) ie> wrote

Quote:
As Ed has covered, it's most likely that each line is not ending with the
CR/LF pair (Hex 0D/0A). You should run a HEX viewer to check the original
file - any other "editor" may lie to you - some will automatically repair
a lone CR, or a lone LF, or a reversed LF/CR, to a "proper" CR/LF pair,
and then you'll not be any wiser at the end.

If it's a CR/LF issue, then you'll need to trace back to the source of
this file - I expect someone there took a wrong option... or prepared the
file for a UNIX platform... or...

Ed has also covered the EOF issue...

Finally, all the PDox "Import" routines - that I'm familiar with - are not
very smart on CSV files, where the field separator char (usually ,) and/or
the field delimiter char (usually ") are embedded within string fields.

- Mike

"Ed Nash" <ask.me (AT) specifically (DOT) pls> wrote in message
news:45ad19a3 (AT) pnews (DOT) thedbcommunity.com...
JoeSpareBedroom wrote:
Not that I can see in WinEdit. However:

- If I open the text file in Word using the "Show All" option, there's a
paragraph mark at the end of each line.

- If I copy the text from the offending file into a new file, the import
works. It's a minor extra step, but still, I'm curious.

One other thought... some programs that create text files put an
end-of-file marker (non-visible) after the last CR/LF. My experience is
that Paradox doesn't like it. I suspect that when you copy/paste you are
not bringing along that EOF byte. Try deleting it with a hex editor or
even using the backspace key after opening the file in Notepad. Then
re-save and re-import.





Reply With Quote
  #7  
Old   
Régis
 
Posts: n/a

Default Re: Flimport Mystery - 01-16-2007 , 03:42 PM



Just a thought;
Can it be linked to a smallint limit?
Régis

"JoeSpareBedroom" <dishborealis (AT) yahoo (DOT) com> a écrit dans le message de news:
82brh.725$ya1.389 (AT) news02 (DOT) roc.ny...
Quote:
This was a fixed length file, so delimiters weren't the problem, although
I know what you mean. The files I get often have commas in the product
descriptions. Since they serve no useful purpose, in terms of legibility,
I do a search/replace and turn them into spaces.

As far the source of the file, you're probably correct about the "wrong
turn". I have no control over what the vendors send us, unfortunately. A
few of the companies have had consistent procedures in place for 10 years,
as evidenced by the age of my flimport spec files. Others think it's fun
to change their formats every 3 months.



"Michael Kennedy" <Info (AT) KennedySoftware (DOT) ie> wrote in message
news:cWarh.17508$j7.339594 (AT) news (DOT) indigo.ie...
As Ed has covered, it's most likely that each line is not ending with the
CR/LF pair (Hex 0D/0A). You should run a HEX viewer to check the original
file - any other "editor" may lie to you - some will automatically repair
a lone CR, or a lone LF, or a reversed LF/CR, to a "proper" CR/LF pair,
and then you'll not be any wiser at the end.

If it's a CR/LF issue, then you'll need to trace back to the source of
this file - I expect someone there took a wrong option... or prepared the
file for a UNIX platform... or...

Ed has also covered the EOF issue...

Finally, all the PDox "Import" routines - that I'm familiar with - are
not very smart on CSV files, where the field separator char (usually ,)
and/or the field delimiter char (usually ") are embedded within string
fields.

- Mike

"Ed Nash" <ask.me (AT) specifically (DOT) pls> wrote in message
news:45ad19a3 (AT) pnews (DOT) thedbcommunity.com...
JoeSpareBedroom wrote:
Not that I can see in WinEdit. However:

- If I open the text file in Word using the "Show All" option, there's
a paragraph mark at the end of each line.

- If I copy the text from the offending file into a new file, the
import works. It's a minor extra step, but still, I'm curious.

One other thought... some programs that create text files put an
end-of-file marker (non-visible) after the last CR/LF. My experience is
that Paradox doesn't like it. I suspect that when you copy/paste you
are not bringing along that EOF byte. Try deleting it with a hex editor
or even using the backspace key after opening the file in Notepad. Then
re-save and re-import.







Reply With Quote
  #8  
Old   
JoeSpareBedroom
 
Posts: n/a

Default Re: Flimport Mystery - 01-16-2007 , 03:53 PM



Not exactly sure what you mean, but all 3 text file columns are being
imported into a table formatted only with alpha fields, since no math is
done on the numbers. Here are a few lines of the text. In the actual file,
that 3rd column is actually right-justified, nice & neat, but will probably
appeared skewed in this message.

01600010610 GOLD MEDAL ALL PURPOSE FLOUR
1161001
01600010640 GOLD MEDAL HARVEST KING BREAD FLO 375001
01600010710 GOLD MEDAL ALL PURPOSE FLOUR
460541001





"Régis" <regis.dd (AT) club-internet (DOT) fr> wrote

Quote:
Just a thought;
Can it be linked to a smallint limit?
Régis

"JoeSpareBedroom" <dishborealis (AT) yahoo (DOT) com> a écrit dans le message de
news: 82brh.725$ya1.389 (AT) news02 (DOT) roc.ny...
This was a fixed length file, so delimiters weren't the problem, although
I know what you mean. The files I get often have commas in the product
descriptions. Since they serve no useful purpose, in terms of legibility,
I do a search/replace and turn them into spaces.

As far the source of the file, you're probably correct about the "wrong
turn". I have no control over what the vendors send us, unfortunately. A
few of the companies have had consistent procedures in place for 10
years, as evidenced by the age of my flimport spec files. Others think
it's fun to change their formats every 3 months.



"Michael Kennedy" <Info (AT) KennedySoftware (DOT) ie> wrote in message
news:cWarh.17508$j7.339594 (AT) news (DOT) indigo.ie...
As Ed has covered, it's most likely that each line is not ending with
the CR/LF pair (Hex 0D/0A). You should run a HEX viewer to check the
original file - any other "editor" may lie to you - some will
automatically repair a lone CR, or a lone LF, or a reversed LF/CR, to a
"proper" CR/LF pair, and then you'll not be any wiser at the end.

If it's a CR/LF issue, then you'll need to trace back to the source of
this file - I expect someone there took a wrong option... or prepared
the file for a UNIX platform... or...

Ed has also covered the EOF issue...

Finally, all the PDox "Import" routines - that I'm familiar with - are
not very smart on CSV files, where the field separator char (usually ,)
and/or the field delimiter char (usually ") are embedded within string
fields.

- Mike

"Ed Nash" <ask.me (AT) specifically (DOT) pls> wrote in message
news:45ad19a3 (AT) pnews (DOT) thedbcommunity.com...
JoeSpareBedroom wrote:
Not that I can see in WinEdit. However:

- If I open the text file in Word using the "Show All" option, there's
a paragraph mark at the end of each line.

- If I copy the text from the offending file into a new file, the
import works. It's a minor extra step, but still, I'm curious.

One other thought... some programs that create text files put an
end-of-file marker (non-visible) after the last CR/LF. My experience
is that Paradox doesn't like it. I suspect that when you copy/paste
you are not bringing along that EOF byte. Try deleting it with a hex
editor or even using the backspace key after opening the file in
Notepad. Then re-save and re-import.









Reply With Quote
  #9  
Old   
Steven Green
 
Posts: n/a

Default Re: Flimport Mystery - 01-16-2007 , 03:59 PM



the only problem with flimport is that it's functionality is so limited, if
the file and/or the results aren't straight-forward.. but in your case they
seem to be.. I never used it regularly.. it was too easy to build an import
shell that can eat *any* file..

--
Steven Green - Waldorf Maryland USA

Diamond Software Group
http://www.diamondsg.com/main.htm
Paradox Support & Sales

Diamond Sports Gems
http://www.diamondsg.com/gemsmain.htm
Sports Memorabilia and Trading Cards

"JoeSpareBedroom" <dishborealis (AT) yahoo (DOT) com> wrote

Quote:
This was a fixed length file, so delimiters weren't the problem, although
I know what you mean. The files I get often have commas in the product
descriptions. Since they serve no useful purpose, in terms of legibility,
I do a search/replace and turn them into spaces.

As far the source of the file, you're probably correct about the "wrong
turn". I have no control over what the vendors send us, unfortunately. A
few of the companies have had consistent procedures in place for 10 years,
as evidenced by the age of my flimport spec files. Others think it's fun
to change their formats every 3 months.



"Michael Kennedy" <Info (AT) KennedySoftware (DOT) ie> wrote in message
news:cWarh.17508$j7.339594 (AT) news (DOT) indigo.ie...
As Ed has covered, it's most likely that each line is not ending with the
CR/LF pair (Hex 0D/0A). You should run a HEX viewer to check the original
file - any other "editor" may lie to you - some will automatically repair
a lone CR, or a lone LF, or a reversed LF/CR, to a "proper" CR/LF pair,
and then you'll not be any wiser at the end.

If it's a CR/LF issue, then you'll need to trace back to the source of
this file - I expect someone there took a wrong option... or prepared the
file for a UNIX platform... or...

Ed has also covered the EOF issue...

Finally, all the PDox "Import" routines - that I'm familiar with - are
not very smart on CSV files, where the field separator char (usually ,)
and/or the field delimiter char (usually ") are embedded within string
fields.

- Mike

"Ed Nash" <ask.me (AT) specifically (DOT) pls> wrote in message
news:45ad19a3 (AT) pnews (DOT) thedbcommunity.com...
JoeSpareBedroom wrote:
Not that I can see in WinEdit. However:

- If I open the text file in Word using the "Show All" option, there's
a paragraph mark at the end of each line.

- If I copy the text from the offending file into a new file, the
import works. It's a minor extra step, but still, I'm curious.

One other thought... some programs that create text files put an
end-of-file marker (non-visible) after the last CR/LF. My experience is
that Paradox doesn't like it. I suspect that when you copy/paste you
are not bringing along that EOF byte. Try deleting it with a hex editor
or even using the backspace key after opening the file in Notepad. Then
re-save and re-import.







Reply With Quote
  #10  
Old   
JoeSpareBedroom
 
Posts: n/a

Default Re: Flimport Mystery - 01-16-2007 , 04:06 PM



The problem is that I'm a dreamer. I imagine that the people who send me
lousy files will walk into a bar and by pure chance, meet the people who
have been sending me good files for the past 10 years. They will be
enlightened. I will be happy.



"Steven Green" <greens (AT) diamondsg (DOT) com> wrote

Quote:
the only problem with flimport is that it's functionality is so limited,
if the file and/or the results aren't straight-forward.. but in your case
they seem to be.. I never used it regularly.. it was too easy to build an
import shell that can eat *any* file..

--
Steven Green - Waldorf Maryland USA

Diamond Software Group
http://www.diamondsg.com/main.htm
Paradox Support & Sales

Diamond Sports Gems
http://www.diamondsg.com/gemsmain.htm
Sports Memorabilia and Trading Cards

"JoeSpareBedroom" <dishborealis (AT) yahoo (DOT) com> wrote in message
news:82brh.725$ya1.389 (AT) news02 (DOT) roc.ny...
This was a fixed length file, so delimiters weren't the problem, although
I know what you mean. The files I get often have commas in the product
descriptions. Since they serve no useful purpose, in terms of legibility,
I do a search/replace and turn them into spaces.

As far the source of the file, you're probably correct about the "wrong
turn". I have no control over what the vendors send us, unfortunately. A
few of the companies have had consistent procedures in place for 10
years, as evidenced by the age of my flimport spec files. Others think
it's fun to change their formats every 3 months.



"Michael Kennedy" <Info (AT) KennedySoftware (DOT) ie> wrote in message
news:cWarh.17508$j7.339594 (AT) news (DOT) indigo.ie...
As Ed has covered, it's most likely that each line is not ending with
the CR/LF pair (Hex 0D/0A). You should run a HEX viewer to check the
original file - any other "editor" may lie to you - some will
automatically repair a lone CR, or a lone LF, or a reversed LF/CR, to a
"proper" CR/LF pair, and then you'll not be any wiser at the end.

If it's a CR/LF issue, then you'll need to trace back to the source of
this file - I expect someone there took a wrong option... or prepared
the file for a UNIX platform... or...

Ed has also covered the EOF issue...

Finally, all the PDox "Import" routines - that I'm familiar with - are
not very smart on CSV files, where the field separator char (usually ,)
and/or the field delimiter char (usually ") are embedded within string
fields.

- Mike

"Ed Nash" <ask.me (AT) specifically (DOT) pls> wrote in message
news:45ad19a3 (AT) pnews (DOT) thedbcommunity.com...
JoeSpareBedroom wrote:
Not that I can see in WinEdit. However:

- If I open the text file in Word using the "Show All" option, there's
a paragraph mark at the end of each line.

- If I copy the text from the offending file into a new file, the
import works. It's a minor extra step, but still, I'm curious.

One other thought... some programs that create text files put an
end-of-file marker (non-visible) after the last CR/LF. My experience
is that Paradox doesn't like it. I suspect that when you copy/paste
you are not bringing along that EOF byte. Try deleting it with a hex
editor or even using the backspace key after opening the file in
Notepad. Then re-save and re-import.









Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.