home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1
/
HamRadio.cdr
/
misc
/
pc_ham2
/
logmerge.2
< prev
next >
Wrap
Text File
|
1985-09-28
|
2KB
|
55 lines
10 REM LOGMERGE VER 790704
20 ERRSET 500,E1,E2
30 INPUT"first file ? ",L1$\IFL1$="" THEN 30
40 INPUT"second file ? ",L2$\IFL2$="" THEN 40
50 INPUT"name of NEW LOG file ? ",L3$\IFL3$=""THEN 50
55 IF LEN(L3$)<8THEN60ELSE!"LENGTH ERROR (max is 7)"\GOTO50
60 INPUT "which drive do you want it on ? ",D\IFD<1ORD>4THEN60
70 L$=L1$\GOSUB320\N1=N\D1$=STR$(I)
80 L$=L2$\GOSUB320\N2=N\D2$=STR$(I)
90 B=INT((N1+N2)/4+0.1*(N1+N2))+2
100 CREATE L3$+","+STR$(D),B
110 CREATE "*"+L3$+","+STR$(D),2
120 OPEN#0,L1$+","+D1$
130 OPEN#1,L2$+","+D2$
140 OPEN#2,L3$+","+STR$(D)
150 FORI=1TON1
160 READ #0,&D1,&D2,&D3,T,F,C$,S,R,M$,P,&Q1,&Q1,X$
170 GOSUB300 \ N3=N3+1\NEXT
180 PRINT"LAST ENTRY IN ",L1$," WAS ",C$
190 FOR I=1TON2
200 READ #1,&D1,&D2,&D3,T,F,C$,S,R,M$,P,&Q1,&Q1,X$
210 GOSUB300 \ N3=N3+1 \NEXT
220 IF N3=N1+N2 THEN 230 ELSE PRINT"ENTRY COUNT ERROR"\GOTO 400
230 OPEN#3,"*"+L3$+","+STR$(D)
240 WRITE#3,N3
250 CLOSE#3
260 CLOSE#2
270 CLOSE#1
280 CLOSE#0
290 GOTO400
300 WRITE#2,&D1,&D2,&D3,T,F,C$,S,R,M$,P,&Q1,&Q2,X$
310 RETURN
320 FORI=1TO4
330 IF FILE("*"+L$+","+STR$(I))=3THENEXIT360
340 NEXT
350 PRINT"LOG FILE ",L$,"NOT ON SYSTEM"\GOTO400
360 OPEN#0,"*"+L$+","+STR$(I)
370 READ#0,N
380 CLOSE#0
390 RETURN
400 FOR I=1 TO 4
410 IF FILE("SYSTEM,"+STR$(I))=2 THEN EXIT 450
420 NEXT
430 PRINT"Put a system disc in any drive, then hit 'RETURN'"
440 INPUT" ",A$\ GOTO 400
450 CHAIN "SYSTEM,"+STR$(I)
500 ERRSET 500,E1,E2
510 IF E2=15 THEN 400
515 IF E1=100 THEN PRINT"CANNOT CREATE NEW FILE ",L3$
520 IF E1<>410 THEN530 ELSE IF I>4 THEN430 ELSE 420
530 IFE1<>330 THEN 540 ELSE IF I>4 THEN 350 ELSE 340
540 IFE2<>7THEN550 ELSE PRINT"FILE ERROR"\GOTO 400
550 IFE2<>8 THEN560 ELSEPRINT"HARD DISC ERROR"\GOTO400
560 PRINT"ERROR ",E2," AT LINE ",E1\GOTO400