home *** CD-ROM | disk | FTP | other *** search
- /*
- $VER: DelRecs.quickfile 1.3 (26 Apr 2000 17:00:20) by M Andre Z Eckenrode
-
- Deletes ALL Records in the current index (with confirmation).
-
- Requires the following external function macros:
-
- ProgressWin.quickfile
- GetViewWin.quickfile
-
- */
-
- options results
-
- setindex
- ndx = upper(result)
- numrecs
- recs = result
-
- if recs = 0 then do
- reqmsg '"No records to delete!"'
- exit
- end
-
- lf = d2c(10)
- reqchoice '"Delete' recs 'record(s) in index' ndx'?"'
- if rc = 5 then exit
- reqchoice '"Deleting all records in index.'lf'Are you sure?"'
- if rc = 5 then exit
-
- esc = d2c(27)
- line = ' Deleting...Record '
- winspec = 'arexx/progresswin'(length(line)+(2*length(recs))+4,'DelRecs.quickfile')
- call open(1win,winspec,'w')
- call writech(1win,esc'[0 p'lf||line)
-
- do i = 1 to recs
- call writech(1win,esc'[2;'length(line)+1'f'i 'of' recs)
- delrec
- end
-
- call close(1win)
- refresh
- reqmsg '"All records in index deleted!"'
-