home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of the Best
/
_.img
/
02192
/
logbook.arc
/
DXCCUPDT.PRG
< prev
next >
Wrap
Text File
|
1987-12-24
|
5KB
|
168 lines
*DXCCUPDT AUTOMATICALLY UPDATES DXCC RECORDS FROM LOG DATABASE VER 860515
* PATCHED 870717 and 871209
* DOES NOT RECOGNISE SEPARATE BANDS OR MODES
* (c) COPYRIGHT JOE KASSER G3ZCZ 1986
SELECT A
USE &logbook INDEX &logndx
SELECT B
USE &dxcc
DO WHILE .NOT. EOF()
CLEAR
? px
IF dstate = 'Q'
?? ' ',dcall,' ALREADY CONFIRMED IN DXCC RECORD'
ELSE
* NOT WORKED YET, SO TRY LOG FOR UPDATE'
STORE TRIM(px) TO prefix
SELECT A
FIND &prefix
IF (EOF() .OR. BOF())
* NO FIND, TRY ALTERNATE PREFIX
SELECT B
IF SUBSTR(px1,1,1) = ' '
* NO ALTERNATE PREFIX, GO TO NEXT PREFIX'
ELSE
STORE TRIM(px1) TO prefix
? px1
SELECT A
FIND &prefix
IF (EOF() .OR. BOF())
*NO FIND AGAIN, GO TO NEXT PREFIX '
ELSE
* FOUND SOMETHING FOR PX1 '
STORE .T. TO qslflag
DO WHILE .NOT. EOF() .AND. call = prefix .AND. qslflag
? call,date,time,band,qslsent,qslrx
IF qslrx = 'R'
STORE .F. TO qslflag
*FOUND A QSL'
ENDIF
SKIP
ENDDO
SKIP -1
STORE call TO call
STORE date TO date
STORE time TO time
STORE mode TO mode
STORE band TO band
SELECT B
REPLACE dcall WITH call
REPLACE ddate WITH date
REPLACE dtime WITH time
REPLACE dmode WITH mode
REPLACE dband WITH band
IF qslflag
REPLACE dstate WITH 'W'
ELSE
REPLACE dstate WITH 'Q'
ENDIF
ENDIF
ENDIF
ELSE
*FOUND SOMETHING FOR PX, see if its qsled'
STORE .T. TO qslflag
DO WHILE .NOT. EOF() .AND. call = prefix .AND. QSLflag
? call,date,time,band,qslsent,qslrx
IF qslrx = 'R'
STORE .F. TO qslflag
*FOUND A QSL'
ENDIF
SKIP
ENDDO
SKIP -1
IF qslflag
*its not qsled, only worked '
* TRY ALTERNATE PREFIX
SELECT B
IF SUBSTR(px1,1,1) = ' '
* NO ALTERNATE PREFIX, GO BACK TO FIRST PREFIX'
STORE TRIM(px) TO prefix
SELECT A
GOTO TOP
* PICK FIRST ONE
FIND &prefix
STORE call TO call
STORE date TO date
STORE time TO time
STORE mode TO mode
STORE band TO band
SELECT B
REPLACE dcall WITH call
REPLACE ddate WITH date
REPLACE dtime WITH time
REPLACE dmode WITH mode
REPLACE dband WITH band
REPLACE dstate WITH 'W'
ELSE
STORE TRIM(px1) TO prefix
* ? px1
SELECT A
FIND &prefix
IF (EOF() .OR. BOF())
*NO FIND AGAIN, GO BACK TO FIRST PREFIX '
SELECT B
STORE TRIM(px) TO prefix
SELECT A
FIND &prefix
SELECT B
REPLACE dstate WITH 'W'
ELSE
* FOUND SOMETHING FOR PX1 '
STORE .T. TO qslflag
DO WHILE .NOT. EOF() .AND. call = prefix .AND. qslflag
? call,date,time,band,qslsent,qslrx
IF qslrx = 'R'
STORE .F. TO qslflag
*FOUND A QSL
ENDIF
SKIP
ENDDO
SKIP -1
STORE call TO call
STORE date TO date
STORE time TO time
STORE mode TO mode
STORE band TO band
SELECT B
IF qslflag
REPLACE dstate WITH 'W'
ELSE
REPLACE dstate WITH 'Q'
ENDIF
ENDIF
SELECT B
REPLACE dcall WITH call
REPLACE ddate WITH date
REPLACE dtime WITH time
REPLACE dmode WITH mode
REPLACE dband WITH band
ENDIF
ELSE
* PX IS QSLED, UPDATE DATA
STORE call TO call
STORE date TO date
STORE time TO time
STORE mode TO mode
STORE band TO band
SELECT B
REPLACE dstate WITH 'Q'
REPLACE dcall WITH call
REPLACE ddate WITH date
REPLACE dtime WITH time
REPLACE dmode WITH mode
REPLACE dband WITH band
ENDIF
ENDIF
ENDIF
SELECT B
SKIP
ENDDO
SELECT B
USE
SELECT A
USE
RELEASE prefix,qslflag, call, date, time, mode, band
RETURN