home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1
/
HamRadio.cdr
/
log
/
logbook
/
logfunct.prg
< prev
next >
Wrap
Text File
|
1986-12-16
|
5KB
|
160 lines
* LOGFUNCT VERSION 860622
* COPYRIGHT JOE KASSER G3ZCZ 1985
DO WHILE task <> '*'
ERASE
@ 2,10 SAY 'G3ZCZ LOGBOOK PACKAGE VERSION 2.0'
@ 4,1 SAY 'CURRENT LOGBOOK IS'
@ 4,21 SAY logbook
@ 6,1 SAY 'CHANGE LOG FILE L'
@ 7,1 SAY 'PRINT LOG PAGES P'
@ 8,1 SAY 'PRINT LOG INDEXED BY CALL SIGN C'
@ 9,1 SAY 'APPEND ENTRIES A'
@ 10,1 SAY 'CREATE NEW LOGBOOK DATABASE N'
@ 11,1 SAY 'HUNT FOR PREFIX/CALL IN LOG H'
@ 12,1 SAY 'SUMMARISE LOG S'
@ 13,1 SAY 'UPDATE QSL STATUS Q'
@ 14,1 SAY 'DISPLAY ENTRIES FOR ONE DAY 1'
@ 15,1 SAY 'DISPLAY LAST 20 ENTRIES IN THE LOG E'
@ 16,1 SAY 'DISPLAY BLOCK OF 20 ENTRIES B'
@ 17,1 SAY 'DISPLAY FILES ON DISK DRIVE F'
@ 20,1 SAY 'QUIT THIS MENU *'
@ 22,1 SAY 'QRU'
@ 22,5 GET task
READ
IF task = 'F'
ERASE
ACCEPT 'WHICH DRIVE ' TO diskdrive
STORE diskdrive + ':' TO diskdrive
DISPLAY FILES ON &diskdrive
RELEASE diskdrive
WAIT
ENDIF
IF task = 'N'
STORE 'LOG' TO log
IF FILE (log+'.DBF')
@ 22,1 SAY 'What is the name of the new Log file '
@ 22,40 GET logbook
READ
IF FILE (logbook+'.DBF')
@ 22,1 SAY ' '
? 'ERROR, ',logbook,' ALREADY EXISTS ON DRIVE'
WAIT
ELSE
@ 22,1 SAY ' '
USE log
COPY STRUCTURE TO &logbook
USE &logbook
SET TALK ON
INDEX ON call+band TO &logbook
SET TALK OFF
ENDIF
ELSE
@ 22,1 SAY ' '
? 'ERROR, BLANK LOG FILE (log>dbf IS NOT PRESENT ON DRIVE'
WAIT
ENDIF
RELEASE log
ENDIF
IF task = 'L'
@ 22,1 SAY 'Which Log file '
@ 22,15 GET logbook
READ
STORE logbook TO logndx
IF FILE (logbook+'.DBF')
@ 22,1 SAY ' '
ELSE
@ 22,1 SAY ' '
? 'ERROR, ',logbook, 'IS NOT PRESENT ON DRIVE'
WAIT
ENDIF
ENDIF
IF FILE (logbook+'.DBF')
IF logbook = ' '
@ 23,1 SAY 'OPEN A LOGBOOK FIRST'
WAIT
STORE 'L' TO task
ELSE
DO CASE
CASE task = 'S'
DO LOGSTAT
CASE task = 'P'
DO LOGPRINT
CASE task = 'H'
DO LOGSRCH
CASE task = 'A'
DO LOGADD
CASE task = 'Q'
DO LOGQSL
CASE task = 'C'
DO LOGCALL
CASE task = '1'
DO LOGDATE
CASE task = 'E'
USE &logbook
GOTO BOTTOM
SKIP -20
ERASE
DO WHILE .NOT. EOF
? #,date,time,call,band,tx,rx,mode
?? power,qslsent,qslrx,comments
SKIP
ENDDO
USE
WAIT
CASE task = 'B'
USE &logbook
ACCEPT 'WHAT ENTRY NUMBER ? ' TO sdate
GOTO BOTTOM
STORE # TO lastone
IF &sdate >= lastone
?
? 'There are only ',lastone,' QSOs in the log'
WAIT
ELSE
GOTO &sdate
STORE '+' TO stask
DO WHILE stask <> '*'
ERASE
STORE 0 TO lcount
? ' # DATE TIME BD CALL RX TX MODE POWER'
?? 'S R COMMENTS'
? '------------------------------------------------------'
?? '------------'
DO WHILE lcount < 20 .AND. .NOT. EOF
DISP
STORE lcount + 1 TO lcount
SKIP
ENDDO
@ 24,1 SAY 'QRU (+ - *)'
@ 24,15 GET stask
READ
IF stask = '-'
STORE # - 40 TO sdate
IF sdate < 1
STORE 1 TO sdate
ENDIF
GOTO sdate
ENDIF
ENDDO
ENDIF
RELEASE lastone,stask,sdate,lcount
USE
ENDCASE
ENDIF
ELSE
@ 22,1 SAY ' '
? 'ERROR, ',logbook, 'IS NOT PRESENT ON DRIVE'
WAIT
ENDIF
ENDDO
USE
STORE ' ' TO task
RETURN