home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
xbase
/
library
/
dbase
/
moss
/
indf.prg
< prev
next >
Wrap
Text File
|
1986-11-09
|
936b
|
45 lines
SET SAFETY OFF
clear
set talk off
fin=0
fin2=0
? "Please choose the fields you would like to arrange the records by."
fn=1
set talk off
do while fn<20
@ fn+2,3 say (str(fn,2)+". "+field(fn))
fn=fn+1
enddo
do while fn<40
@ fn-17,35 say (str(fn,2)+". "+field(fn))
fn=fn+1
enddo
@ 2,1 to 22,20 double
@ 2,33 to 22,53 double
@ 3,55 say "DATABASE IN USE:"+dab
@ 2,54 TO 5,78
@ 23,1 say " Input number corresponding to primary index:" get fin picture "99" range 1,39
@ 24,1 say " Secondary Index:" get fin2 picture "99" range 1,39
read
clear
ind=space(8)
@ 2,2 say "Please give a name to this index file:" get ind
read
nd=ndx(1)
inf=field(fin)
if fin2=0
index on &inf to &ind
else
on error DO INERROR
inf2=field(fin2)
index on &inf + &inf2 to &ind
endif
if len(trim(nd))>1
on error set index to &ind
set index to &ind,&nd
else
set index to &ind
endif
return