home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 3
/
hamradioversion3.0examsandprograms1992.iso
/
log
/
log3_52a
/
was.prg
< prev
next >
Wrap
Text File
|
1990-05-04
|
4KB
|
139 lines
*:*********************************************************************
*:
*: Program: WAS.PRG
*:
*: System: PC-HAM Logbook
*: Author: Joe Kasser G3ZCZ
*: Copyright (c) 1990, Joe Kasser
*: Last modified: 05/04/90 12:17
*:
*: Called by: LOGAWARD.PRG
*:
*: Calls: WASEDIT.PRG
*: : WASPRINT.PRG
*: : LOGCHNGE.PRG
*:
*: Uses: &WAS
*: : &NWAS.DBF
*:
*: Documented 05/04/90 at 13:49 SNAP! version 3.12f
*:*********************************************************************
DO WHILE task <> '*'
CLEAR
SET COLOR TO W+/R,W+/RB,BG+
@ 5,11 SAY 'G3ZCZ WAS AWARD PACKAGE VERSION 1.6'
SET COLOR TO GR+/B,W+/RB,BG+
@ 7,1 SAY 'Default WAS database is'
SET COLOR TO W+/R,W+/RB,BG+
@ 7,25 SAY TRIM(was)
SET COLOR TO GR+/B,W+/RB,BG+
@ 8,1 SAY 'Default LOG database is'
SET COLOR TO W+/R,W+/RB,BG+
@ 8,25 SAY TRIM(logbook)
SET COLOR TO GR+/B,W+/RB,BG+
@ 10,1 SAY 'UPDATE WAS RECORDS U'
@ 11,1 SAY 'CREATE A NEW WAS DATABASE C'
@ 12,1 SAY 'PRINT WAS RECORDS P'
@ 20,1 SAY 'QUIT THIS MENU *'
@ 14,1 SAY 'CHANGE WAS DATABASE D'
@ 15,1 SAY 'CHANGE LOGBOOK L'
@ 16,1 SAY 'DISPLAY FILES ON DISK DRIVE F'
@ 22,1 SAY 'QRU'
@ 22,5 GET task
READ
DO CASE
CASE task = 'F'
CLEAR
ACCEPT 'WHICH DRIVE ? ' TO diskdrive
diskdrive = SUBSTR(diskdrive,1,1)
STORE diskdrive + ':' TO diskdrive
DISPLAY Files ON &diskdrive
RELEASE diskdrive
WAIT
CASE task = 'D'
@ 22,1 SAY 'What WAS file ? '
@ 22,25 GET was
READ
IF FILE(was +'.DBF')
ELSE
? 'ERROR, WAS FILE IS NOT ON DEFAULT DRIVE'
WAIT
ENDIF
CASE task = 'U'
IF logbook = ' '
@ 23,1 SAY 'OPEN A LOGBOOK FIRST'
ELSE
IF FILE(was + '.DBF')
IF FILE (logbook + '.DBF')
DO wasedit
ELSE
? 'ERROR, LOGBOOK IS NOT PRESENT ON DESIGNATED DRIVE'
WAIT
ENDIF
ELSE
? 'ERROR, WAS FILE IS NOT ON DEFAULT DRIVE'
WAIT
ENDIF
ENDIF
CASE task = 'P'
IF FILE(was + '.DBF')
DO wasprint
ELSE
? 'ERROR, WAS FILE IS NOT ON DEFAULT DRIVE'
WAIT
ENDIF
CASE task = 'C'
STORE ' ' TO BLANK
IF FILE(was + '.DBF')
ACCEPT 'What is the name of the new WAS file ? ' TO nwas
IF LEN( nwas) = 1
? ' ERROR BLANK FILE NAMES NOT ALLOWED'
WAIT
ELSE
IF FILE(nwas + '.DBF')
? 'ERROR, FILE ALREADY EXISTS'
WAIT
ELSE
?
? 'CREATING blankwas FILE'
USE &was
COPY TO &nwas
USE &nwas
DO WHILE .not. EOF()
? pc,state
REPLACE dcall WITH BLANK
REPLACE ddate WITH BLANK
REPLACE dband WITH BLANK
REPLACE dmode WITH BLANK
REPLACE dstate WITH BLANK
SKIP
ENDDO
?
? 'NEW BLANK WAS FILE CREATED'
USE
ENDIF
ENDIF
RELEASE BLANK,nwas
ELSE
? 'ERROR, WAS FILE IS NOT ON DEFAULT DRIVE'
WAIT
ENDIF
CASE task = 'L'
DO logchnge
ENDCASE
ENDDO
STORE ' ' TO task
RETURN
*: EOF: WAS.PRG