home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug104.arc
/
MENU.LBR
/
MUSE.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
3KB
|
130 lines
*
* muse.cmd
*
* Glenn Story - 6/11/83
*
* This command file will select the data base to use
*
set talk off
store ' ' to cur:file
store ' ' to cur:index
store ' ' to cur:fields
store f to got:index
do while (cur:file = ' ') .or. (.not. got:index)
set intensity off
do muse1
set intensity on
if cur:file = '?'
erase
list files
wait
loop
endif
if cur:index = '?'
erase
list files like *.ndx
wait
loop
endif
if cur:fields = '?'
erase
use &cur:file
list structure
wait
store f to got:index
loop
endif
if cur:file = ' '
@ 20,10 say "Data base name not specified"
store ' ' to cur:file
else
if .not. file (cur:file)
@ 20,10 say "Data base name not found on disk"
store ' ' to cur:file
endif
endif
store t to got:index
if (cur:index # ' ') .and. (cur:fields # ' ')
@ 21,10 say "Don't specify both index name and index fields"
store f to got:index
endif
if (cur:index # ' ')
store trim (cur:index) + '.ndx' to index:file
if .not. file (index:file)
@ 22,10 say "Specified index file is not on disk"
store f to got:index
endif
endif
if (cur:file = ' ') .or. (.not. got:index)
wait
endif
enddo
if cur:index = ' '
use &cur:file
if cur:fields # ' '
index on &cur:fields to temp
endif
else
use &cur:file index &cur:index
endif
ey
if (*) .or. (#=0)
loop
endif
*
do case
case type='M'
store id to cur:name
loop
case tye file &cur:file
rename temp to &cur:file
*
CASE MAINT:CMD = "MADD"
*
do muse
append
*
CASE MAINT:CMD = "MBROWSE"
*
do muse
browse
*
CASE MAINT:CMD = 'MCOM'
*
erase
modify command
*
CASE MAINT:CMD = 'MCREATE'
*
set intensity on
accept "Enter data base name: " to cur:file
create &cur:file
set intensity off
use &cur:file
do mindex
*
CASE MAINT:CMD = 'MDELETE'
ndex name and index fields"
store f to got:index
endif
if (cur:index # ' ')
store trim (cur:index) + '.ndx' to index:file
if .not. file (index:file)
@ 22,10 say "Specified index file is not on disk"
store f to got:index
endif
endif
if (cur:file = ' ') .or. (.not. got:index)
wait
endif
enddo
if cur:index = ' '
use &cur:file
if cur:fields # ' '
index on &cur:fields to temp
endif
else
use &cur:file index &cur:index
endif
ey