10 ' HAMSEQ - Check for out of sequence records and skips in QSO numbers
15 'CHANGE DATE - 1/12/85
20 DEF SEG = 64 : POKE 23,64 ' Set caps lock on
30 NONE = -1
40 PRINT : PRINT "What drive is the file on?"
50 O$=INKEY$ : IF O$="" GOTO 50 ' WAIT FOR RESPONSE
60 IF O$ = "A" OR O$="B" THEN DR1$=O$+":" :GOTO 90 'DISKETTE A OR B
70 IF O$ = "C" OR O$="D" THEN DR1$=O$+":" :GOTO 90 'DRIVE C OR D
80 GOTO 50 ' NOT VALID DRIVE, RETRY
90 ' **** SET FIELD LENGTHS
100 DIM FL(12)
110 DATA 5,8,5,1,1,10,6,1,4,1,4,23
120 FOR I = 1 TO 12: READ FL(I):NEXT
130 GOSUB 320 ' GET NEW HEADER INFORMATION
140 OPEN DR1$+"HAMLOG.DAT" AS 1 LEN=72
150 FIELD 1,FL(1) AS DF1$,FL(2) AS DF2$,FL(3) AS DF3$,FL(4) AS DF4$,FL(5) AS DF5$,FL(6) AS DF6$,FL(7) AS DF7$,FL(8) AS DF8$,FL(9) AS DF9$,FL(10) AS DF10$,FL(11)AS DF11$,FL(12) AS DF12$,1 AS DFLG$
160 GET 1,1 ' get the first record
170 OLDQSO$=DF1$ ' Save QSO for comparison
180 FOR I = 2 TO NUMREC-1 ' Go through entire file
220 IF VAL(DF1$) = VAL(OLDQSO$) THEN PRINT "Duplicate QSO number at record numbers ";I-1;" and ";I :PRINT "Duplicate QSO number at record numbers ";I-1;" and ";I :NONE = 0 : GOTO 260
230 IF VAL(DF1$) < VAL(OLDQSO$) THEN PRINT "Step down in QSO number between record numbers ";I-1;" and ";I :LPRINT "Step down in QSO number between record numbers ";I-1;" and ";I : NONE = 0 : GOTO 250
240 PRINT "Skip in QSO numbers between record number ";I-1;"and ";I;" QSO number ";OLDQSO$ :LPRINT "Skip in QSO numbers between record number ";I-1;"and ";I;" QSO number ";OLDQSO$ : NONE = 0
250 OLDQSO$=DF1$ ' Keep new one for comparison
260 NEXT
270 IF NONE THEN LPRINT "No skips or step downs found."
280 LPRINT CHR$(12) ' Skip to top of the page
290 CLOSE
300 RUN "MMENU
310 COLOR 7,0:RETURN
320 ' *** ROUTINE TO GET HEADER RECORD AND DISPLAY
330 OPEN DR1$+"HAMHDR.DAT" AS 3 LEN=24
340 FIELD 3,4 AS A$,4 AS B$,8 AS C$,8 AS D$ : GET 3,1 ' SET HEADER RECORD FLD
350 NUMREC=CVS(A$):NUMQSO=CVS(B$):STRDATE$=C$:ENDDATE$=D$ ' GET HEADER FIELDS
360 LOCATE 23,1:PRINT "First date - ";STRDATE$;" : Last date - ";ENDDATE$;" : Number of records -";NUMREC;
370 LPRINT "First date - ";STRDATE$;" : Last date - ";ENDDATE$;" : Number of records -";NUMREC;