10 ! PROGRAM TO CALC STORAGE FOR ALL UIC'S AND FLAG THOSE WITH
15 ! EXCESS BLOCK USAGE
20 DIM L$[132],UI$[9]V,UN$[7]V,L1$[80]V,L2$[80]V,L3$[80]V
100 ! GENERATE FILE WITH TOTAL BLOCKS
105 B=0
110 CALL "SPAWNB"("PIP STO.TMP=[*,*]/TB",B)
120 IF B>0 THEN CALL "SPAWNB"("PIP STO.TMP/PU",B)
140 OPEN #3, "STO.LIM/RO"
145 IF END #3 THEN 400
150 OPEN #4, "STO.TMP/RO/LN:132"
155 IF END #4 THEN 500
156 PRINT CHR$(12);" "," BLOCKS"," BLOCKS"," TOTAL"
157 PRINT "UIC","USED","ALLOCATED","FILES"
158 PRINT
200 ! READ ALLOCATION & REPORT
205 INPUT LINE #4, L$
207 J=POS(L$,"[") : K=POS(L$,"]") : C=POS(L$,",")
210 UI$=SEG$(L$,J,K) : UN=VAL(SEG$(L$,J+1,C-1)) : GN=VAL(SEG$(L$,C+1,K-1))
215 INPUT LINE #4,L$
220 L$=SBS$(L$,14) : ! TRIM OFF LEADING GARBAGE
230 L1$=PIECE$(L$," BLOCKS IN ",1)
240 L3$=PIECE$(L$," BLOCKS IN ",2)
250 L3$=PIECE$(L3$," FILE",1)
260 L2$=PIECE$(L1$,"/",2)	 ! BLOCKS ALLOCATED
270 L1$=PIECE$(L1$,"/",1)	 ! BLOCKS USED
275 L1=VAL(L1$) : L2=VAL(L2$) : L3=VAL(L3$)
280 PRINT UI$,L1,L2,L3,
300 ! CHECK FOR LIMITS
310 RESTORE #3
320 INPUT #3, U,G,W,E	:! READ USER, GROUP, WARNING & ERROR LIMITS
330 IF U>UN THEN 400 :	!DONE IF PAST USER NUMBER
340 IF U<UN THEN 320 :	!READ AGAIN IF NOT TO USER NUMBER
350 IF G>GN THEN 400 :  !DONE IF SAME GROUP BUT USER NUMBER GREATER
360 IF G<GN THEN 320 :	!READ AGAIN IF SAME GROUP BUT USER NUMBER LESS
370 ! FOUND A MATCH CHECK
380 IF L2>E THEN PRINT "ERROR"; : GOTO 400
390 IF L2>W THEN PRINT "WARNING";
400 PRINT
410 GOTO 200
500 CLOSE
510 L$=PIECE$(L$,"GRAND TOTAL OF ",2)
530 L1$=PIECE$(L$," BLOCKS IN ",1)
540 L3$=PIECE$(L$," BLOCKS IN ",2)
550 L3$=PIECE$(L3$," FILE",1)
560 L2$=PIECE$(L1$,"/",2)	 ! BLOCKS ALLOCATED
570 L1$=PIECE$(L1$,"/",1)	 ! BLOCKS USED
575 L1=VAL(L1$) : L2=VAL(L2$) : L3=VAL(L3$)
580 PRINT : PRINT "TOTALS",L1,L2,L3;
590 L$=PIECE$(L$,"FILES IN ",2)
600 L=VAL(PIECE$(L$,"."))
610 PRINT " IN ";FRMT$(L,3);"  DIRECTORIES"
620 EXIT
