home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of the Best
/
_.img
/
02192
/
logbook.arc
/
LOGADD.PRG
< prev
next >
Wrap
Text File
|
1987-12-24
|
5KB
|
177 lines
*LOGADD VERSION 871209 CALLED FROM LOGBOOK
* (c) COPYRIGHT JOE KASSER G3ZCZ 1986
* IF YOU CHANGE THE STRUCTURE OF THE DATABASE TO INCREASE THE
*WIDTH OF THE COMMENTS, MODIFY THE PROGRAM AS SHOWN BELOW
ACCEPT 'Are you running this in real TIME (Y/N) ? ' to rtf
IF rtf = 'Y'
STORE '9999' TO otime
STORE ' ' TO dummy
ENDIF
USE &logbook
STORE .T. TO callflag
GOTO BOTTOM
STORE call TO lastcall
STORE RECNO() TO lastentry
*initialise new variables
STORE date TO ndate
STORE TIME TO ntime
STORE band TO nband
STORE power TO npower
STORE mode TO nmode
STORE rx TO nrx
STORE tx TO ntx
SET INDEX TO &logndx
CLEAR
*MAIN LOOP
DO WHILE callflag
STORE "-" TO nqslsent
STORE "-" TO nqslrx
STORE " " TO ncall
* CHANGE THE LENGTH OF THE SPACES BETWEEN THE " " ON THE NEXT LINE
* IF YOU CHANGE THE WIDTH OF THE COMMENTS here it is set to 10
STORE " " TO ncomments
STORE " " TO logflag
STORE .T. TO dataflag
DO WHILE dataflag
IF rtf = 'Y'
* DO REALTIME
ntime = time()
ndate = dtoc(date())
ndate = substr(ndate,7, 2) + '/' + substr(ndate,1,5)
ntime = substr(ntime,1,2) + substr(ntime,4,2)
ENDIF
@ 19,1 SAY lastentry
@ 19,12 SAY "LAST CONTACT WAS WITH "
@ 19,35 SAY lastcall
@ 21,3 SAY "DATE"
@ 21,11 SAY "TIME"
@ 21,19 SAY "CALL"
@ 21,26 SAY "BAND"
@ 21,31 SAY "PWR"
@ 21,36 SAY "MODE"
@ 21,41 SAY "RX"
@ 21,45 SAY "TX"
@ 21,49 SAY "S"
@ 21,51 SAY "R"
@ 21,55 SAY "COMMENTS"
@ 23,1 SAY "QRU (*TPHL)"
IF logflag <> 'T'
@ 22,1 GET ndate
@ 22,11 GET ntime
@ 22,16 GET ncall
@ 22,27 GET nband
@ 22,31 GET npower
@ 22,36 GET nmode
@ 22,41 GET nrx
@ 22,45 GET ntx
@ 22,49 GET nqslsent
@ 22,51 GET nqslrx
@ 22,53 GET ncomments
ENDIF
@ 23,13 GET logflag
READ
DO CASE
CASE logflag = 'H'
GOTO TOP
STORE 1 TO linecount
STORE TRIM(ncall) TO fcall
FIND &fcall
IF (EOF() .OR. BOF())
CLEAR
@ 5,1 SAY ncall
@ 5,12 SAY "Does not appear to be in the log"
WAIT
CLEAR
ELSE
DO WHILE CALL = fcall .AND. (.NOT. EOF())
IF linecount = 1
CLEAR
@ 1,10 SAY "PREVIOUS LOG ENTRIES ARE "
ENDIF
? RECNO(),date,TIME,call,band,tx,rx,mode,power
?? qslsent,qslrx,comments
STORE linecount + 1 TO linecount
IF linecount = 20
?
WAIT
STORE 1 TO linecount
ENDIF
SKIP
ENDDO
?
WAIT
IF linecount > 16
CLEAR
ENDIF
ENDIF
CASE logflag = 'L' .OR. logflag = 'P'
IF logflag = 'L'
*LOG ENTRY
APPEND BLANK
STORE .F. TO dataflag
REPLACE qslsent WITH nqslsent
REPLACE qslrx WITH nqslrx
REPLACE date WITH ndate
REPLACE TIME WITH ntime
REPLACE call WITH ncall
REPLACE band WITH nband
REPLACE power WITH npower
REPLACE mode WITH nmode
REPLACE rx WITH nrx
REPLACE tx WITH ntx
REPLACE comments WITH ncomments
STORE call TO lastcall
STORE RECNO() TO lastentry
STORE " " TO ncall
STORE " " TO ncomments
ENDIF
IF logflag = 'P' .OR. logflag = 'L'
USE &logbook
GOTO BOTTOM
SKIP -12
CLEAR
@ 1,1 SAY '12 ENTRIES BEFORE'
@ 1,20 SAY lastcall
@ 1,30 SAY ' IN LOG, ARE'
?
DO WHILE .NOT. EOF()
? RECNO(),date,time,call,band,tx,rx,mode
?? power,qslsent,qslrx,comments
SKIP
ENDDO
SET INDEX TO &logndx
ENDIF
CASE logflag = "*"
STORE .F. TO callflag
STORE .F. TO dataflag
CASE logflag = 'T'
IF rtf = 'Y'
ndate = dtoc(date())
ndate = substr(ndate,7, 2) + '/' + substr(ndate,1,5)
ntime = time()
ntime = substr(ntime,1,2) + substr(ntime,4,2)
ENDIF
@ 22,1 SAY ndate
@ 22,11 SAY ntime
ENDCASE
ENDDO
ENDDO
USE
* GET READY TO EXIT
RELEASE lastcall,lastentry,ndate,ntime,ncall,nband,npower,nmode
RELEASE nqslsent,nqslrx,nrx,ntx,ncomments,fcall,linecount,fdate
RELEASE otime,rtf,mtime,cpointer,dummy,hour,min,mm,dd,yy,ndate
RELEASE callflag,dataflag,logflag
RETURN