Import question

This forum is for eXpress++ general support.
Post Reply
Message
Author
omni
Posts: 554
Joined: Thu Jan 28, 2010 9:34 am

Import question

#1 Post by omni »

Roger,

We import all sort of files from banks and other resources. Normally a flat file with fixed length, or one that is comma delimited..or has some sort of identifier.
This one is tab delimited with each line being a different length. There is no tab delimited in Alask that I can find, just the comma. The var length makes it difficult to use any memoread. There is no constant at the beginning of each line. There are quotes around each item.

Any thoughts on how to read this file record by record to import...or best method?

I am considering looking for the end of line (return) and build it manually line by line, but was wondering if there was something I do not know about.

Update: There is no return at the end of each line, although there are definite lines. Using an editor with hex showing has nothing at the end of each line. I may be doing something wrong..not sure.


Thanks

Fred
Omni

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Import question

#2 Post by Cliff Wiernik »

I have taken the dbexport programs, or the alternate one from the alaska website and modified to provide the delimiting character. We had a file that was not CRLF but only one of them and needed to be able to specify the delimiter. Worked fine.

Also, have used DC_Token() and modified it in the past to do something like this.

You may want to look at these items.

Cliff.

bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Import question

#3 Post by bwolfsohn »

i think you can use dc_tokenarray() and specifiy the tab character as a delimiter.
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Import question

#4 Post by rdonnay »

I use the dc_txtline function to read a line from the file and the dc_token array function to parse the items into an array
The eXpress train is coming - and it has more cars.

Post Reply