home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Du Jour
/
SoftwareDuJour.iso
/
BUSINESS
/
DBASE
/
DB3.ARC
/
NAMETEST.PRG
< prev
next >
Wrap
Text File
|
1984-10-25
|
4KB
|
85 lines
********** Nametest COMMAND FILE **********
* Checks names in the file in USE against the Supplier file and gives
* the operator the options of editing, adding them to the Supplier file
* or ignoring them. If a name is edited, it is presented again.
***********************************************************************
PARAMETER File_no
GO TOP
DO WHILE .NOT. EOF()
IF DELETED()
SKIP
ELSE
CLEAR
@ 4,25 SAY 'CHECKING NAMES '
@ 6,25 SAY 'RECORD '+STR(RECNO(),5)
@ 7,25 SAY UPPER(Name)
Decision = 'T'
Tname = Name
Key = SUBSTR(Name,1,10)
SELECT 4
SEEK Key
IF EOF()
Again = .T.
DO WHILE Again
@ 9,20 SAY 'THIS SUPPLIER NAME IS NOT IN THE Supplier FILE. '
@ 11,20 SAY ' &F3 to CONTINUE. '
@ 12,20 SAY ' &F4 to EDIT. '
@ 13,20 SAY ' &F5 to ADD it to the Supplier file. '
SET COLOR TO ,
@ 14,0 GET Decision
READ
SET COLOR TO W, ,W
DO CASE
CASE UPPER(Decision) = 'A'
APPEND BLANK
REPLACE Supplier with UPPER(Tname)
CLEAR
@ 3, 0 SAY 'Supplier Entry'
@ 5, 0 SAY ' Supplier Name' GET Supplier PICTURE ;
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
@ 6, 0 SAY ' Address' GET Address PICTURE ;
'!!!!!!!!!!!!!!!!!!!!!!!!'
@ 7, 0 SAY ' City' GET City PICTURE '!!!!!!!!!!!!!!!!'
@ 8, 0 SAY ' State' GET State PICTURE '!!'
@ 9, 0 SAY ' Phone' GET Phone_Nmbr
@ 10, 0 SAY ' Area Code' GET Area_Code
@ 19,10 SAY '^W to save, ESC to cancel changes.'
READ
Again = .F.
*
CASE UPPER(Decision) = 'E'
SELECT &File_no
CLEAR
@ 3, 0 SAY ' Entry'+ STR(RECNO(),5)
@ 5, 0 SAY ' CHECK DATE' GET Check_Date
@ 6, 0 SAY ' CHECK NUMBER' GET Check_Nmbr
@ 7, 0 SAY ' CLIENT' GET Client PICTURE '!!!'
@ 8, 0 SAY ' JOB NUMBER' GET Job_Nmbr
@ 9, 0 SAY ' AMOUNT' GET Amount
@ 10, 0 SAY ' NAME' GET Name PICTURE '!!!!!!!!!!!!!!!!!!!!'
@ 11, 0 SAY ' DESCRIPTION' GET Descrip PICTURE '!!!!!!!!!!!!!!!!!!!!'
@ 12, 0 SAY ' BILL NUMBER' GET Bill_Nmbr PICTURE '!!!!!!!'
@ 13, 0 SAY ' BILL DATE' GET Bill_Date
@ 14, 0 SAY ' HOURS' GET HOURS
@ 15, 0 SAY ' EMPLOYEE NUMBER' GET Emp_Nmbr
@ 19,10 SAY '^W to save, ESC to cancel changes.'
READ
SELECT 4
Again = .F.
*
CASE UPPER(Decision) = 'C'
Again = .F.
*
OTHERWISE
Again = .T.
ENDCASE
ENDDO
ENDIF not found
SELECT &File_no
IF UPPER(Decision) <> 'E'
SKIP
ENDIF
ENDIF deleted
ENDDO
RETURN