breezett93
Technical User
Hello.
So I have a program that reads in a CSV file and copies its contents into a DBF. After some minor formatting is done, the table is then copied into the final DBF file.
This process used to work smoothly, but recently, the .CDX that is located with the final DBF file disappears every time the program is run which then causes the accounting software to error out because the required index is missing/wrong. I can manually recreate the index just fine, but then I'll run the program, and it disappears. I've also tried creating the index within the program which does work. However, the accounting software still errors out about an index issue.
To get a better visual, this is the whole program. Not much to it.
Thank you.
So I have a program that reads in a CSV file and copies its contents into a DBF. After some minor formatting is done, the table is then copied into the final DBF file.
This process used to work smoothly, but recently, the .CDX that is located with the final DBF file disappears every time the program is run which then causes the accounting software to error out because the required index is missing/wrong. I can manually recreate the index just fine, but then I'll run the program, and it disappears. I've also tried creating the index within the program which does work. However, the accounting software still errors out about an index issue.
To get a better visual, this is the whole program. Not much to it.
Code:
CLOSE ALL DATABASES
SET EXCLUSIVE ON
SET SAFETY OFF
*Convert CSV to DBF
SELECT A
USE f:\directory1\Data\PRXPST02
SET EXCLUSIVE OFF
APPEND FROM f:\directory2\PRXPST02.CSV DELIMITED
*Remove first line
DELETE For Xseqno = 'xseqno'
PACK
*Send it to SBT
COPY TO f:\directory3\prxpst02.DBF
*Clear out file
ZAP
*Create index
*SELECT B
*USE f:\directory3\prxpst02.DBF
*CD f:\directory3
*INDEX ON Xseqno TO PRXPST02.CDX
QUIT
RETURN
Thank you.