Normal Topic Importing  ASCII - Data in Sesame (Read 1024 times)
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Importing  ASCII - Data in Sesame
Dec 8th, 2005 at 12:07pm
Print Post Print Post  
I've hit a wall, I can't seem to figure out how to import  complete records from an ASCII file.
The Files have not the same Langth.

Any Suggestion is appreciated.
PLease help!

Hier is one example:


00010 013 8000 1250
00011 014 2001 01101
00012 014 2025 11994
00013 031 2013 AOK Schleswig-Holstein
00014 019 2014 Ahrensburg
00015 021 2014 Bad Segeberg
00016 018 2014 Flensburg
00017 018 2014 Helgoland
00018 016 2014 Itzehoe
00019 013 2014 Kiel
00020 015 2014 Lbeck
00021 016 2014 Meldorf
00022 019 2014 Neumnster
00023 016 2014 Niebll
00024 018 2014 Oldenburg
00025 018 2014 Pinneberg
00026 013 2014 Pl”n
00027 018 2014 Ratzeburg
00028 018 2014 Rendsburg
00029 018 2014 Schleswig
00030 011 2018 01
00031 010 2006 1
00032 016 2003 1317004
00033 022 2004 Edisonstr. 70
00034 014 2034 24145
00035 013 2035 Kiel
00036 022 2036 Postfach 7030
00037 014 2037 24170
00038 013 2038 Kiel
00039 011 2008 00
00040 031 2002 AOK Schleswig-Holstein
00041 011 2008 01
00042 033 2002 AOK Schleswig-Holste/SVA
00043 011 2008 02
00044 033 2002 AOK Schleswig-Holste/BVG
00045 011 2008 03
00046 033 2002 AOK Schleswig-Holste/BEG
00047 011 2008 06
00048 033 2002 AOK Schleswig-Holste/SHT
00049 011 2008 07
00050 033 2002 AOK Schleswig-Holst/BVFG
00051 011 2008 08
00052 033 2002 AOK Schleswig-Holstei/AS
00053 011 2008 09
00054 031 2002 AOK Schleswig-Holstein

00055 013 8000 1250
00056 014 2001 01251
00057 014 2025 31975
00058 039 2013 LKK Schlesw-Holst. und Hamburg
00059 013 2014 Kiel
00060 011 2018 02
00061 010 2006 1
00062 016 2003 1308719
00063 021 2004 Schulstr. 29
00064 014 2034 24143
00065 013 2035 Kiel
00066 011 2008 00
00067 027 2002 LKK Sch.-H.+Hambg.
00068 011 2008 01
00069 031 2002 LKK Sch.-H.+Hambg./SVA
00070 011 2008 02
00071 031 2002 LKK Sch.-H.+Hambg./BVG
00072 011 2008 08
00073 030 2002 LKK Sch.-H.+Hambg./AS
00074 011 2008 09
00075 027 2002 LKK Sch.-H.+Hambg.

00076 013 8000 1250
00077 014 2001 01310
00078 014 2025 31994
00079 031 2013 IKK Schleswig-Holstein
00080 019 2014 Bdelsdorf
00081 014 2014 Eutin
00082 018 2014 Flensburg
00083 014 2014 Heide
00084 013 2014 Kiel
00085 015 2014 Lbeck
00086 016 2014 Meldorf
00087 018 2014 Oldenburg
00088 018 2014 Ratzeburg
00089 018 2014 Rendsburg
00090 011 2018 03
00091 010 2006 1
00092 016 2003 1300129
00093 031 2004 Am Friedrichsbrunnen 2
00094 014 2034 24782
00095 029 2035 Rendsburg-Bdelsdorf
00096 021 2036 Postfach 440
00097 014 2037 24754
00098 029 2038 Rendsburg-Bdelsdorf
00099 011 2008 00
00100 031 2002 IKK Schleswig-Holstein
00101 011 2008 01
00102 033 2002 IKK Schleswig-Holste/SVA
00103 011 2008 02
00104 033 2002 IKK Schleswig-Holste/BVG
00105 011 2008 08
00106 033 2002 IKK Schleswig-Holstei/AS
00107 011 2008 09
00108 031 2002 IKK Schleswig-Holstein

00109 013 8000 1250
00110 014 2001 01311
00111 014 2025 12003
00112 020 2013 IKK-Direkkt
00113 013 2014 Kiel
00114 011 2018 03
00115 010 2006 1
00116 016 2003 1300130
00117 014 2027 12003
00118 020 2004 Kaistr. 101
00119 014 2034 24114
00120 013 2035 Kiel
00121 022 2036 Postfach 7143
00122 014 2037 24171
00123 013 2038 Kiel
00124 011 2008 00
00125 014 2039 12003
00126 020 2002 IKK-Direkkt
00127 011 2008 01
00128 014 2039 12003
00129 024 2002 IKK-Direkkt/SVA
00130 011 2008 02
00131 014 2039 12003
00132 024 2002 IKK-Direkkt/BVG
00133 011 2008 03
00134 014 2039 12003
00135 024 2002 IKK-Direkkt/BEG
00136 011 2008 09
00137 014 2039 12003
00138 020 2002 IKK-Direkkt

...
« Last Edit: Dec 8th, 2005 at 6:37pm by Amor »  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
Don Haley
Member
*
Offline


No personal text

Posts: 38
Location: Plymouth, Devon, UK
Joined: Jan 23rd, 2004
Re: Importing  ASCII - Data in Sesame
Reply #1 - Dec 8th, 2005 at 12:49pm
Print Post Print Post  
Have you read page 305 in the 1.1 User Guide?

Don
  
Back to top
 
IP Logged
 
daniel
Member
*
Offline


No personal text

Posts: 7
Location: Germany
Joined: Dec 20th, 2005
Re: Importing  ASCII - Data in Sesame
Reply #2 - Dec 21st, 2005 at 11:10pm
Print Post Print Post  
Hello Amor,

I wrote some parsers to import ASCII files into Sesame. Please explain your problem more detailed.

It would be helpful to know the design of your complete record and which data must be collected from the ASCII file.

Best regards,
Daniel (from Germany)

  
Back to top
 
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: Importing  ASCII - Data in Sesame
Reply #3 - Dec 22nd, 2005 at 11:45am
Print Post Print Post  
Hello Daniel,

Thank you for the Reply.

I have difficulties with my ascii - filestructure !

As you see in the Example of the ASCII - File
contain constant fields but a record may have variable amount of Items.
Example the field Assurance (the 3. row :  2013)
have  the Assurance name " AOK Schleswig-Holstein"
but This Assurance can have many agencies ( the 3.row:  2014)
So the Length of records is different.

Mus be the Import in a Main Form with a Subform (for the variable account of Items) ?


This is a Fixed ASCII file (not a Standard ASCII file).
I converted it with Marcellous (fxd2std.db) converter application.

But This file converter is simply file converter.
They do not prepare files for import into a main form and subform.

So as you say, i will need a ASCII - parsing program  especially for that purpose. But i have no experience with ASCII - Parsing.

I need to import only the 3. and the 4. row.

Any Help is very appreciated.

Happy Holidays
« Last Edit: Dec 22nd, 2005 at 4:05pm by Amor »  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
daniel
Member
*
Offline


No personal text

Posts: 7
Location: Germany
Joined: Dec 20th, 2005
Re: Importing  ASCII - Data in Sesame
Reply #4 - Dec 25th, 2005 at 7:05pm
Print Post Print Post  
Quote:
Mus be the Import in a Main Form with a Subform (for the variable account of Items) ?

If you need the agencies in your database, too, I would suggest to design a subform.

Quote:
So as you say, i will need a ASCII - parsing program  especially for that purpose. But i have no experience with ASCII - Parsing.

I need to import only the 3. and the 4. row.

If you do not need the agencies, it should be easy to write a parser for your need:

If I am right, every new (main) record starts with "XXXXX 013 8000 250". So you have just to write a code that waits for the next "013 8000 250", discards the next line and imports the following two lines.

After that, the code has to discard all lines until "013 8000 250" appears again. By this, you get only the 3rd and 4th line of each record.

However, it is essential that "013 8000 250" appears only in the first line of each record. You should check this carefully before you start to code the parser.

Best regards,
Daniel (from Germany)
  
Back to top
 
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: Importing  ASCII - Data in Sesame
Reply #5 - Dec 28th, 2005 at 10:24am
Print Post Print Post  
Hello Daniel,

I don´t  need the agencies und think you very much for any help.



  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged