10 '"SPREADSHEET CONSOLIDATOR." COPYRIGHT 1984 BY ROBERT E. JOSEPHSON
22 KEYOFF:CLS:T$="Consolidate Data from "+CHR$(34)+".DIF"+CHR$(34)+" files":LOCATE1,1:PRINTT$:LOCATE25,1:PRINT"Copyright 1984 by Robert E. Josephson";:DEFSEG=&H40:DIMW$(1,1),W#(1,1):W=40:DEFFNT=(W-LEN(T$))\2
740 GOSUB 6100:LOCATE 3,1:PRINT"Consolidation of .DIF Files into":PRINT FIL$+SPACE$(39-LEN(FIL$)):PRINT"successfully completed":LOCATE 6,1:PRINT"File has been saved by ROW":LOCATE CSRLIN+2:GOTO 10000
1000 LOCATE7,1:PRINTSTRING$(39,196):T$=CHR$(34)+".DIF"+CHR$(34)+" Files on Drive "+DRIVE$:LOCATE8,1:COLOR7,0:PRINTT$:X=0:IFX<0THENX=0
1300 LINE INPUT#1,A$:IF A$<>"TABLE"THEN CLS:LOCATE 10,1:PRINT "File read is not a legal .DIF file.": LOCATE 11,1:PRINT "Choose a new file": CLS : GOTO 90
1740 IFB$=M$(RM,0)THEN1750 ELSERM=RM+1:IFRM<=MASTROWTHEN1740 ELSEGOSUB8070:LOCATE3,1:PRINT"**WARNING** NO MATCH FOUND FOR:":PRINTB$:LOCATE5,1:PRINT"Press Any Key to Continue":GOSUB8100:GOSUB8120
6000 GOSUB8070:LOCATE3,1:PRINT"Enter the name of the CONSOLIDATED":PRINT"file you are creating":LINEINPUTB$:GOSUB8010:FIL$=B$:Z=INSTR(FIL$,"."):IFZ=0THENFIL$=FIL$+".DIF
7150 GOSUB 8070:IF LEFT$(FIL$,3)="MAS"THEN LOCATE 3,1:PRINT"Select Disk Drive Where";:LOCATE 5,1:PRINT "(Use <- or ->)":LOCATE 4,1:PRINT FIL$+" File Located
7185 IF LEFT$(FIL$,3)="SUB"THEN LOCATE 3,1:PRINT"Select Disk Drive Where":LOCATE 4,1:PRINT FIL$+" Files Located :LOCATE 5,1:PRINT "(USE <- OR ->)
7190 X=0
7200 LOCATE4,29:COLOR(X<>0)*(-7),(X=0)*(-7):PRINT" A ":LOCATE4,32:COLOR(X<>1)*(-7),(X=1)*(-7):PRINT" B ":LOCATE4,35:COLOR(X<>2)*(-7),(X=2)*(-7):PRINT" C ":LOCATE4,38:COLOR(X<>3)*(-7),(X=3)*(-7):PRINT" D ":COLOR7,0
7315 IFCOUNT%=0THENLOCATE6,1:PRINT"Unable to find "+CHR$(34)+".DIF"+CHR$(34)+" files":PRINT"on Disk Drive "+DRIVE$:LOCATECSRLIN+2:PRINT"Press any key to continue - ":PRINT"-Then reselect Disk Drive" ELSE7318
7316 IFINKEY$=""THEN7316
7318 RETURN
7330 GOSUB8070:LOCATE3,1:PRINT"Select "+FIL$+" File":PRINT"Using Cursor Controls":IFMASTX>-2THENLOCATE6:PRINT"Press "+CHR$(34)+"Esc"+CHR$(34)+" to END Processing";
8500 STOP:IFERR<>9THENPRINT"Have encountered error number ";ERR;" in line ";ERL:STOP
8520 CLS:PRINT"There is a problem in processing ";FIL$:LOCATE3,1:PRINT"You indicated that ";FIL$;:PRINT"was saved by";:IFROWSW=1THENPRINT"ROW" ELSEPRINT"COLUMN
8550 LOCATECSRLIN+1,1:PRINT"It is possible that it was actually":PRINT"saved by";:IFROWSW=0THENPRINT"ROW" ELSEPRINT"COLUMN
8570 LOCATECSRLIN+1,1:PRINT"Press any key to process another file ":PRINT"or to reprocess ";FIL$:RESUME700
8590 GOSUB8070:SOUND120,3:LOCATE3,1:PRINT"***WARNING*** UNABLE TO OPEN":PRINTMDR$+MASTFIL$:LOCATE5,1:PRINT"Press any key to reselect file
8594 IFINKEY$=""THEN8594 ELSERESUME160
8600 GOSUB8070:SOUND120,3:LOCATE3,1:PRINT"***WARNING*** UNABLE TO OPEN":PRINTDRIVE$+":"+FIL$:LOCATE5,1:PRINT"Press any key to reselect file
9010 FORR=1TO10:FORC=1TO6:PRINTW#(R,C),:NEXTC:PRINT:NEXTR:STOP:FORR=1TO10:FORC=1TO6:PRINTW$(R,C),:NEXTC:PRINT:NEXTR:STOP:FORR=1TO15:PRINTM$(R,0),M$(R,1):NEXT:CLOSE:OPEN "junk.dif" FOR INPUT AS 1