sunwindandsea
Programmer
I import a text file named myfile.dat that will always contains 1 line of text. These are EDI data file in th X12 format. The 1 line of text can be 256 characters long or more than 2000 charatcers in length.
When the file is imported into a db file in a current app it is parsed into separate lines by a “~”.
Sejksejefj*kmkfjfsf*dgkbfkjkj*jgkgjz~
fjjtjtjtjtjtj*sjsjg588839583w9*sk~
Sejksejefj*kmkfjfsf*dgkbfkjkj*jgkgjz~
fjjtjtjtjtjtj*sjsjg588839583w9*sk~
...~
...~
...~
I append these text files into a database called mydb.dbf with 1 field whose length is 175 characters.
I have been using the following code to create a database file
cSource = "myfile.dat"
SELE A
USE F:\mydb ALIAS mydb EXCLUSIVE
ZAP
APPEND FROM &cSource TYPE SDF
In other programs that I have used this code I get the desired dbf file, that is, a new record is created in mydb after each “~”
I copied this code to a new program file and complied the program file and the result was a database file with only 1 line.
Sejksejefj*kmkfjfsf*dgkbfkjkj*jgkgjz~fjjtjtjtjtjtj*sjsjg588839583w9*sk~Sejksejefj*kmkfjfsf*dgkbfkjkj*jgkgjz~fjjtjtjtjtjtj*sjsjg588839583w9*sk~...~ (Up to 175 in length)
I have forgotten something. Many of my other programs use the above code with no problem. It has been quite a while since I worked in Foxpro 2.6 for DOS (3-4 years.) I have examined, studied, reviewed and driven myself crazy looking at one of the shorter apps using the above code and I cannot comprehend why the code creates the database file with only 1 line.
Thanks, Ed
When the file is imported into a db file in a current app it is parsed into separate lines by a “~”.
Sejksejefj*kmkfjfsf*dgkbfkjkj*jgkgjz~
fjjtjtjtjtjtj*sjsjg588839583w9*sk~
Sejksejefj*kmkfjfsf*dgkbfkjkj*jgkgjz~
fjjtjtjtjtjtj*sjsjg588839583w9*sk~
...~
...~
...~
I append these text files into a database called mydb.dbf with 1 field whose length is 175 characters.
I have been using the following code to create a database file
cSource = "myfile.dat"
SELE A
USE F:\mydb ALIAS mydb EXCLUSIVE
ZAP
APPEND FROM &cSource TYPE SDF
In other programs that I have used this code I get the desired dbf file, that is, a new record is created in mydb after each “~”
I copied this code to a new program file and complied the program file and the result was a database file with only 1 line.
Sejksejefj*kmkfjfsf*dgkbfkjkj*jgkgjz~fjjtjtjtjtjtj*sjsjg588839583w9*sk~Sejksejefj*kmkfjfsf*dgkbfkjkj*jgkgjz~fjjtjtjtjtjtj*sjsjg588839583w9*sk~...~ (Up to 175 in length)
I have forgotten something. Many of my other programs use the above code with no problem. It has been quite a while since I worked in Foxpro 2.6 for DOS (3-4 years.) I have examined, studied, reviewed and driven myself crazy looking at one of the shorter apps using the above code and I cannot comprehend why the code creates the database file with only 1 line.
Thanks, Ed