home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Du Jour
/
SoftwareDuJour.iso
/
BUSINESS
/
DBASE
/
DBASEACC.ARC
/
JOBSINDX.PRG
< prev
next >
Wrap
Text File
|
1979-12-31
|
1KB
|
35 lines
*** JOBSINDX.CMD **
* Indexes the costbase on job numbers to Jobs.NDX.
* The method of indexing here allows us to use the index to help
* find job numbers for the Job Costs command files, but allows us to
* do so without having to index the Costbase every time we add a bill.
* The strategy is: before we index the Costbase on job numbers,
* we first store the number of the last record in a record with a job
* number of zero. When the file is indexed, this record is at the top
* of the indexed file ($Jobs) so that we can find it whenever we want to.
********
USE Costbase
GO BOTTOM
STORE STR(#,5) TO Temp
GO TOP
IF Job:Nmbr = 0
REPLACE Name WITH Temp
ELSE
DO WHILE !(Code) <> 'H'
? "Uh, Oh--Trouble. Don't touch anything"
ACCEPT 'and call Warren.' TO Code
ENDDO
ENDIF
DELETE FILE $Jobs.NDX
ERASE
@ 5,0 SAY 'There are ' + Temp + ' records to index.'
SET TALK ON
INDEX ON Job:Nmbr TO $Jobs
SET TALK Off
RELEASE Temp
RETURN