home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Phoenix CD 2.0
/
Phoenix_CD.cdr
/
01e
/
let12.zip
/
DEMO-11.BAT
< prev
next >
Wrap
DOS Batch File
|
1987-09-17
|
1KB
|
36 lines
echo Off
If `%Name%' == `' Demo
cls
echo ╔════════════════════════════════════════════════════════════════╗
echo ┌─╫────────────────────────────────────────────────────────────────╫─┐
echo │ ║ Accessing Databases and files: READ, TRIM, REPLACE ║ │
echo └─╫────────────────────────────────────────────────────────────────╫─┘
echo ╚════════════════════════════════════════════════════════════════╝
echo
set DB-File=DATABASE.DBF
echo I have included a file called %DB-File%, created by DBASE-III,
echo as part of this demonstation. In it is the following information:
echo
echo Field Name Length
echo -------------- --------
echo (delete field) 1 char
echo First Name 10 chars
echo Last Name 12 chars
echo Street 32 chars
echo City 20 chars
echo State 2 chars
echo Zip 10 chars
echo --------
echo For a record of 87 characters.
echo
echo There are an unknown (as of yet) number of records, and we will
echo presently read through this database, extracting the information
echo as we go.
echo
pause
set Rec=0
LET LastRec=(+ (asc (read DB-File 4 1)) (* (asc (read DB-File 5 1)) 256))
rem the above computes the number of recs (0..65535) using lo-hi notation
echo We now know that there are %LastRec% records in %DB-File%.
DEMO-12