home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
dedit.zip
/
LISTER.PRG
< prev
next >
Wrap
Text File
|
1986-06-19
|
1KB
|
49 lines
clear
store space(10) to datafile
do while datafile = space(10)
clear
@ 6,10 say "Name of DBF file to list? ";
get datafile picture "!!!!!!!!"
read
clear
store datafile+".DBF" to d1
if .not. file("&d1")
@ 7,10 say "File does not exist."
store space(10) to datafile
endif
enddo
USE &datafile
* Display field name header.
f = 1
? "Record# "
DO WHILE "" <> FIELD(f)
field = FIELD(f)
DO CASE
CASE TYPE("&field") = 'C'
LEN = LEN(&field)
CASE TYPE("&field") = 'N'
LEN = LEN(str(&field))
CASE TYPE("&field") = 'D'
LEN = LEN(DTOC(&field))
CASE TYPE("&field") = 'L'
LEN = 1
ENDCASE
?? SUBSTR(field + SPACE(80), 1, LEN) + ' '
f = f + 1
ENDDO
*Display data..
DO WHILE .NOT. EOF()
? RECNO(), IF(DELETED(), "*", " ")
f = 1
DO WHILE "" <> field(f)
field = FIELD(f)
?? &field
?? ' '
f = f + 1
ENDDO
SKIP
ENDDO
wait
Return