|
Had
a little involvement with dBase and its generic database language
for a single job site. They were still running either
dBaseIII+ or dBase4 and needed a file ported to a location which,
guess what -- the other location was not running dBASE so
they needed an ASCII flat file. The dBase language was an
interpreted language, designed to run only in the dBase shell.
|
***********************************************************************
** -- import .txt file created on host system to dBASE III Plus format
** -- ray 06/97
***********************************************************************
**
CLEAR
@ 1,1 TO 18,79 DOUBLE
@ 3,20 SAY "Woodhall Invoicing Download Utility"
* --
SET SAFETY OFF
* -- open header file
USE LUCHEAD
* -- then clear
@ 5,4 SAY "Clearing LUCHEAD.DBF for import"
ZAP
** -- read in .txt file
@ 7,4 SAY "Reading LUCHEAD.TXT into dBASE III Plus"
APPEND FROM LUCHEAD.TXT TYPE DELIMITED
** --
** -- if first char of last row is ascii 12 then delete row
GO BOTTOM
Firstval = ASC(LMINV)
IF Firstval = 12
SET TALK OFF
DELETE REST
PACK
SET TALK ON
ENDIF
CLOSE ALL
** -- open detail file
USE LUCBALE
* -- then clear
@ 10,4 SAY "Clearing LUCBALE.DBF for import"
ZAP
** -- read in .txt file
@ 12,4 SAY "Reading LUCBALE.TXT into dBASE III Plus"
APPEND FROM LUCBALE.TXT TYPE DELIMITED
** --
** -- if first char of last row is ascii 12 then delete row
GO BOTTOM
Firstval = ASC(LMINV)
IF Firstval = 12
SET TALK OFF
DELETE REST
PACK
SET TALK ON
ENDIF
SET SAFETY ON
** -- reset pointer
GO TOP
@ 15,4 SAY "Done"
** -- end
|