Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : PLUSBKUP.ZIP
Filename : PLUSBKUP.PRG

 
Output of file : PLUSBKUP.PRG contained in archive : PLUSBKUP.ZIP


* PLUSBKUP - dBASE III PLUS Backup procedure for backing up large
* database files ( > 360K bytes) to floppy diskettes.

* ask for location and name of file
set talk off
set echo off
clear
@ 2,1 to 23,79 double
mname=space(8)
mdrive=space(1)
mpath=space(30)

@ 4,20 say " dBASE III PLUS - LARGE FILE BACKUP PROCEDURE "

@ 8,10 say " DISK DRIVE (C,D): "
@ 8,40 say "Enter X to EXIT this procedure"
@ 9,10 say " Database NAME: "

do while .T.
@ 8,35 get mdrive picture "!"
@ 9,35 get mname picture "!!!!!!!!"
read
@ 11,10 say replicate(" ",60)
if (mdrive $ "CD" .and. mname <> space(8)) .or. mdrive = "X"
exit
endif
@ 11,10 say " DRIVE must be C,D, (or X) - Name must not be blank "
enddo

If mdrive="X"
return
endif

set default to &mdrive

@ 11,6 say "Enter PATH to database file:"
@ 12,6 say "DO NOT ENTER THE DRIVE LETTERS! (assumed to be what you entered above)"
@ 13,6 say "(Leave Blank if database file is in default directory)"
@ 14,6 say "(Remember to include a final backslash (\))"
@ 11,40 get mpath picture "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
read

if mpath <> space(30)
kp=mdrive+":"+mpath
set path to &kp
endif
errx="N"
close databases
on error store "Y" to errx
use &mname

if errx = "Y"
@ 20,20 say "Sorry, File Not Found. Aborting Routine"
close databases
on error
return
endif
nhhrec = INT(355000/(recsize()+1))
nhhrec = nhhrec - mod(nhhrec,100)
nhhdisk = int(reccount()/nhhrec)+1

@ 16,10 SAY " You will need "
SET COLOR TO W+
?? transform(nhhdisk,"99")+" FORMATTED DISKS "
SET COLOR TO W
?? " to backup your data file"

mrsp=SPACE(1)

@ 17,6 say "Label "+transform(nhhdisk,"99")+" of these disks "+mname+" BACKUP"
if nhhdisk > 1
?? ", number them from 1 to "+ transform(nhhdisk,"99")
endif

set color to w+
@ 20,10 say "X"
set color to w
?? ":Abort Backup Procedure "
set color to w+
?? "C"
set color to w
?? "ontinue Backup "
set color to w+
?? " ENTER C/X: "


do while .T.
@ 20,70 get mrsp picture "!"
read
if mrsp $ "CX"
exit
endif
set color to w+
@ 21,30 say " Invalid Entry, Reenter"
enddo
if mrsp = "X"
@ 2,2 clear to 22,78
return
endif
@ 15,2 clear to 22,78

select 1
use &mname
go top
j=0
k=1
lname=trim(mname)
ln=len(lname)
ln=iif(ln=8,ln-1,ln)
ks="A:"+left(mname,ln)
kl=ks+transform(k,"9")
do while .T.
set color to w+
hi=j+nhhrec
@ 17,4 clear to 21,76
@ 24,0 say replicate(" ",77)
@ 18,9 say "Put "+mname+" Backup Diskette "+transform(k,"99")+" in drive A: and close drive "
@ 17,4 to 19,76
@ 23,79 say ""
wait
@ 24,0 say replicate(" ",60)
@ 17,4 to 21,76
on error @20,6 say "CASE STATEMENT ERROR"
do case
case nhhdisk = 1
@ 20,6 say "Copying all "+transform(reccount(),"9999")+" Records to backup disk as "+kl+".DBF"
case k < nhhdisk
@ 20,6 say "Copying "+transform(nhhrec,"9999")+" Records to backup disk as "+kl+".DBF"
case k = nhhdisk
kk=reccount() - ( (nhhdisk-1) * nhhrec)
@ 20,6 say "Copying remaining "+transform(kk,"9999")+" Records to backup disk as "+kl+".DBF"
endcase
on error
@ 24,3 say " NOTE: Each Floppy Backup Disk will take one to five minutes to fill "
set safety off
copy to &kl while .not. eof() .and. recno() <= hi
set safety on
if eof()
exit
endif
j=j+nhhrec
k=k+1
kl=ks+transform(k,"9")
enddo

@ 24,0 say replicate(" ",77)
@ 22,30 say " DATABASE BACKUP COMPLETE "
@ 23,79 say ""
wait
@ 17,4 clear to 22,76
@ 24,0 say replicate(" ",77)
close databases
set color to w
clear











  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : PLUSBKUP.ZIP
Filename : PLUSBKUP.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/