home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of the Best
/
_.img
/
02192
/
logbook.arc
/
LOGUPDAT.PRG
< prev
next >
Wrap
Text File
|
1987-12-24
|
4KB
|
132 lines
*LOGUPDATE VERSION 860422 COPYRIGHT (c) JOE KASSER G3ZCZ 1985,1986
*UTILITY TO ENTER CONTEST LOG DATA INTO DATABASE BY HAND
CLEAR
@ 12,28 SAY 'WARNING'
@ 14,14 SAY 'THIS MODULE DOES NOT INVOKE THE INDEX '
@ 16,2 SAY ' USE OF THIS MODULE ON A REGULAR LOG FILE WILL FOUL ITS INDEX'
@ 18,1 SAY 'BE SURE YOU ARE ONLY WORKING WITH A PREVIOUSLY CREATED CONTEST LOG'
@ 20,1 SAY ' '
WAIT
USE &logbook
STORE .T. TO callflag
GOTO BOTTOM
STORE call TO lastcall
*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
*MAIN LOOP
DO WHILE callflag
CLEAR
STORE "-" TO nqslsent
STORE "-" TO nqslrx
STORE " " TO ncall
STORE " " TO ncomments
STORE " " TO logflag
STORE .T. TO dataflag
@ 4,1 SAY 'NOTE, leave space between number and data in comments if'
@ 5,1 SAY 'MODE = SSB (eg 59 100)'
DO WHILE dataflag
@ 10,1 SAY "LAST CONTACT WAS"
@ 10,20 SAY lastcall
@ 12,1 SAY "DATE"
@ 13,1 SAY "TIME"
@ 14,1 SAY "CALL"
@ 15,1 SAY "BAND"
@ 16,1 SAY "POWER"
@ 17,1 SAY "MODE"
@ 18,1 SAY "REPORT (RX)"
@ 19,1 SAY "REPORT (TX)"
@ 20,1 SAY "COMMENTS"
@ 23,1 SAY "Logit (*BL)"
@ 12,13 SAY ndate
@ 15,13 SAY nband
@ 16,13 SAY npower
@ 17,13 SAY nmode
@ 18,13 SAY nrx
@ 19,13 SAY ntx
@ 13,13 GET ntime
@ 14,13 GET ncall
@ 20,13 GET ncomments
@ 23,13 GET logflag
READ
DO CASE
CASE logflag = "*"
STORE .F. TO callflag
STORE .F. TO dataflag
CASE 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 " " TO ncall
STORE " " TO ncomments
CASE logflag = 'B'
@ 15,13 GET nband
ENDCASE
ENDDO
ENDDO
?
?
STORE ' ' TO df
ACCEPT 'Is this the last entry in the whole log (Y/N) ? ' TO df
IF df = 'Y'
? 'Formatting the log now,'
?
ACCEPT 'Do you want the contacts numbered ? ' TO df
STORE 1 TO qsocount
GOTO TOP
DO WHILE .NOT. EOF()
REPLACE rx WITH SUBSTR(comments,1,3)
REPLACE comments WITH SUBSTR(comments,4,10)
IF df = 'Y'
STORE STR(qsocount,10) TO number
DO WHILE SUBSTR(number,1,1) = ' '
STORE SUBSTR(number,2,10) TO number
ENDDO
REPLACE comments WITH TRIM(number)+'-'+comments
STORE qsocount + 1 TO qsocount
ENDIF
DISP
SKIP
ENDDO
?
? 'Indexing logbook, please standby'
SET TALK ON
INDEX ON call+band TO &logndx
SET TALK OFF
ENDIF
* GET READY TO EXIT
RELEASE df,callflag,lastcall,ndate,ntime,nband,npower
RELEASE nmode,nrx,ntx,nqslsent,nqslrx,ncall,ncomments
RELEASE logflag,dataflag,qsocount,number
USE
RETURN