home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
754.LOGDXCC.PRG
< prev
next >
Wrap
Text File
|
1985-09-28
|
5KB
|
148 lines
*LOGDXCC AUTOMATICALLY UPDATES DXCC RECORDS FROM LOG DATABASE VER 850928
* DOES NOT RECOGNISE SEPARATE BANDS OR MODES
* COPYRIGHT JOE KASSER G3ZCZ 1985
STORE 0 TO worked
STORE 0 TO qsled
SELECT PRIMARY
USE &logbook INDEX &logbook
SELECT SECONDARY
USE B:dxcc
DO WHILE .NOT. EOF
? px
IF dstate = 'Q'
* ALREADY IN DXCC RECORD, IGNORE REST'
STORE worked + 1 TO worked
STORE qsled + 1 TO qsled
ELSE
* NOT WORKED YET, SO TRY LOG FOR UPDATE'
STORE TRIM(px) TO prefix
SELECT PRIMARY
FIND &prefix
IF # = 0
* NO FIND, TRY ALTERNATE PREFIX
SELECT SECONDARY
IF $(px1,1,1) = ' '
* NO ALTERNATE PREFIX, GO TO NEXT PREFIX'
ELSE
STORE TRIM(px1) TO prefix
SELECT PRIMARY
FIND &prefix
IF # = 0
*NO FIND AGAIN, GO TO NEXT PREFIX '
ELSE
* FOUND SOMETHING FOR PX1 '
STORE T TO qslflag
DO WHILE call = prefix .AND. qslflag
IF qslrx = 'R'
STORE F TO qslflag
*FOUND A QSL'
ENDIF
SKIP
ENDDO
SKIP -1
SELECT SECONDARY
REPLACE dcall WITH call
REPLACE ddate WITH date
REPLACE dtime WITH time
REPLACE dmode WITH mode
REPLACE dband WITH band
STORE worked + 1 TO worked
IF qslflag
REPLACE dstate WITH 'W'
ELSE
REPLACE dstate WITH 'Q'
STORE qsled + 1 TO qsled
ENDIF
ENDIF
ENDIF
ELSE
*FOUND SOMETHING FOR PX, see if its qsled'
STORE T TO qslflag
DO WHILE call = prefix .AND. qslflag
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 SECONDARY
IF $(px1,1,1) = ' '
* NO ALTERNATE PREFIX, GO BACK TO FIRST PREFIX'
STORE TRIM(px) TO prefix
SELECT PRIMARY
GOTO TOP
FIND &prefix
SELECT SECONDARY
REPLACE dstate WITH 'W'
STORE worked + 1 TO worked
REPLACE dcall WITH call
REPLACE ddate WITH date
REPLACE dtime WITH time
REPLACE dmode WITH mode
REPLACE dband WITH band
ELSE
STORE TRIM(px1) TO prefix
SELECT PRIMARY
FIND &prefix
IF # = 0
*NO FIND AGAIN, GO BACK TO FIRST PREFIX '
STORE TRIM(px) TO prefix
SELECT PRIMARY
FIND &prefix
ELSE
* FOUND SOMETHING FOR PX1 '
STORE T TO qslflag
DO WHILE call = prefix .AND. qslflag
IF qslrx = 'R'
STORE F TO qslflag
*FOUND A QSL
ENDIF
SKIP
ENDDO
SKIP -1
IF qslflag
REPLACE dstate WITH 'W'
ELSE
REPLACE dstate WITH 'Q'
STORE qsled + 1 TO qsled
ENDIF
ENDIF
SELECT SECONDARY
STORE worked + 1 TO worked
REPLACE dstate WITH 'W'
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
SELECT SECONDARY
STORE qsled + 1 TO qsled
STORE worked + 1 TO worked
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
?? dcall,dstate,worked,qsled
SELECT SECONDARY
SKIP
ENDDO
RELEASE worked,qsled,prefix,qslflag
RETURN