home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1
/
HamRadio.cdr
/
misc
/
pc-hamd3
/
dxccedit.bas
< prev
next >
Wrap
BASIC Source File
|
1985-09-28
|
3KB
|
89 lines
10 REM DXCCEDIT Version 821020 COPYRIGHT JOE KASSER G3ZCZ 1982
20 ON ERROR GOTO 430
30 M = 350
40 DIM P$(M),C$(M),B$(M),M$(M),T(M),Q(M),D$(M)
50 INPUT "Which DXCC record file " ; F$
60 IF LEN(F$) = 0 THEN 50
70 OPEN"I",#2,F$ + ".DX"
80 OPEN "O",#1,F$ + ".$$$"
90 PRINT "LOADING FILE NOW "
100 IF EOF(2) THEN 160
110 INPUT#2,P$,C$,B$,M$,D$,T,Q
120 I = I + 1
130 P$(I) = P$ : C$(I) = C$ : B$(I) = B$ : M$(I) = M$
140 D$(I) = D$ : T(I) = T : Q(I) = Q
150 GOTO 100
160 CLOSE #2
170 PRINT "THERE ARE";I;" ENTRIES IN THE FILE"
180 INPUT "WHICH PREFIX ";P1$
190 IF P1$ = "*" THEN 340
200 N = 1
210 FOR J = 1 TO I - N
220 IF LEFT$(P$(J),LEN(P1$)) = P1$ THEN 250
230 NEXT J
240 PRINT P1$; " IS NOT IN FILE" : GOTO 180
250 C$ = C$(J) : D$ = D$(J) : T = T(J) : B$ = B$(J) : M$ = M$(J) : Q = Q(J)
260 P$ = P$(J)
270 GOSUB 730
280 GOSUB 520
290 C$(J) = C$ : D$(J) = D$ : B$(J) = B$ : M$(J) = M$ : T(J) = T : Q(J) = Q
300 INPUT "ANOTHER ENTRY ";A$
310 IF A$ = "" THEN 300
320 IF LEFT$(A$,1) = "Y" THEN 180
330 IF LEFT$(A$,1) = "N" THEN 340 ELSE 300
340 PRINT "EDIT IS TERMINATED"
350 FOR J = 1 TO I
355 PRINT P$(J); TAB(6); C$(J); TAB(16); :
357 Q= Q(J) : GOSUB 760
360 PRINT#1, P$(J);",";C$(J);",";B$(J);",";M$(J);",";D$(J);",";T(J);",";Q(J)
370 NEXT
380 CLOSE#1
390 KILL F$ + ".BAK"
400 NAME F$ + ".DX" AS F$ + ".BAK"
410 NAME F$ + ".$$$" AS F$ + ".DX"
420 GOTO 490
430 ON ERROR GOTO 430
440 IF ERL = 640 THEN RESUME 660
450 IF ERR = 53 AND ERL = 390 THEN RESUME 400
460 IF ERL = 70 THEN RESUME 500
470 IF ERL = 380 AND ERR = 61 THEN PRINT "DISK IS FULL"
480 STOP
490 END
500 PRINT "FILE DOES NOT EXIST" : GOTO 50
510 GOSUB 730
520 INPUT "QSL status or whole ENTRY ";A$
530 IF LEFT$(A$,1) = "E" THEN 560
540 IF LEFT$(A$,1) = "Q" THEN 660
550 GOTO 520
560 INPUT "Which Band ";A$
570 IF LEN(A$) = 0 THEN 580 ELSE B$ = A$
580 INPUT "Which Mode ";A$
590 IF LEN(A$) = 0 THEN 600 ELSE M$ = A$
600 INPUT "Call Sign ";A$
610 IF LEN(A$) = 0 THEN 620 ELSE C$ = A$
620 INPUT "Date YY/MM/DD ";A$
630 IF LEN(A$) = 0 THEN 640 ELSE D$ = A$
640 INPUT "Time ";A
650 T = A
660 INPUT "QSL Status (Q W D B) " ;A$
670 IF LEN(A$) = 0 THEN 720 ELSE Q$ = A$
680 IF LEFT$(Q$,1) = "Q" THEN Q = 1
690 IF LEFT$(Q$,1) = "W" THEN Q = 2
700 IF LEFT$(Q$,1) = "D" THEN Q = 3
710 IF LEFT$(Q$,1) = "B" THEN Q = 4
720 GOSUB 730 : GOTO 820
730 PRINT P$ TAB(6) B$ TAB(10) M$ TAB(14);
740 PRINT C$ TAB(25) D$ TAB(34) T ;
750 PRINT TAB(40) ;
760 ON Q-1 GOTO 780,790,800
770 PRINT "QSL'D" : GOTO 810
780 PRINT "WORKED" : GOTO 810
790 PRINT "MAILED DIRECT" : GOTO 810
800 PRINT "SENT VIA BUREAU" : GOTO 810
810 RETURN
820 INPUT "Are the data correct ";A$
830 IF LEN(A$) = 0 THEN 820
840 IF LEFT$(A$,1) = "N" THEN 510
850 IF LEFT$(A$,1) = "Y" THEN 860 ELSE 820
860 RETURN