00001	!								&
	!		V A X C L E A N U P				&
	!								$
00010	ON ERROR GOTO 9000
00015	EXTERNAL LONG FUNCTION LIB$SPAWN				&
\	DECLARE  LONG ISTAT
00020	OPEN "QUEWRK.ZZZ" FOR INPUT AS FILE 1%
00030	OPEN "[.COM]QUECLEANUP.COM" FOR OUTPUT AS FILE 2%
00040	INPUT LINE #1%, QUETIME$					&
\	QUETIME$ = EDIT$(QUETIME$,4%+128%)
00050	PRINT #2%, "$ SET NOON"
00100	WHILE -1%
00110	INPUT LINE #1%, QUELINE$
00115	QUELINE$ = EDIT$(QUELINE$,4%+128%)
00120	GOTO 110 IF LEN(QUELINE$) = 0%
00125	X% = INSTR(1%,QUELINE$,"$!>")					&
\	GOTO 110 IF X% = 0%						&
\	ORG.FILE$ = RIGHT(QUELINE$,4%)
00128	INPUT LINE #1%, QUELINE$					&
\	QUELINE$ = EDIT$(QUELINE$,4%)
00130	X% = INSTR(1%,QUELINE$,"$!DELETE ")				&
\	GOTO 110 IF X% = 0%
00140	PRINT #2%,"$ ";RIGHT(QUELINE$,3%)
00145	INPUT LINE #1%, QUELINE$					&
\	QUELINE$ = EDIT$(QUELINE$,4%+32%)				&
\	GOTO 110 IF LEFT(QUELINE$,14%) <> "$!DELETE/ENTRY"
00150	PRINT #2%, "$ ";RIGHT(QUELINE$,3%)
00152	INPUT LINE #1%, QUELINE$					&
\	QUELINE$ = EDIT$(QUELINE$,4%+32%)				&
\	GOTO 110 IF LEFT(QUELINE$,9%) <> "$!DELETE "			&
\	PRINT #2%, "$ ";RIGHT(QUELINE$,3%)
00153	DELETE.IT% = 0%							&
\	DELETE.IT% = -1% IF INSTR(1%,QLINE$,"/DELETE") <> 0%		&
\	PRINT #2%, "$ DELETE ";ORG.FILE$ IF DELETE.IT%
00195	LINES% = LINES% + 1%
00198	NEXT

00899	!								&
	!		C L O S E   F I L E S				&
	!								$
00900	PRINT #2%, "$ SET ON"
00905	CLOSE 1,2
00910	IF LINES% = 0%							&
		THEN							&
		KILL "[.COM]QUECLEANUP.COM"				&
\		PRINT "Nothing to print"				&
\		GOTO 32767
00920	ISTAT = LIB$SPAWN("KERMIT SEND [.COM]QUECLEANUP.COM")
00998	GOTO 32767
08999	!								&
	!		E R R O R   T R A P S				&
	!								$
09000	IF ERL = 110 OR ERL = 40 THEN RESUME 900
09098	RESUME 32500
32499	!								&
	!		E R R O R   M E S S A G E S			&
	!								$
32500	E% = ERR							&
\	E$ = SYS(CHR$(6%) + CHR$(9%) + CHR$(E%))			&
\	E$ = CVT$$(RIGHT(E$,3%),4%)					&
\	E$ = E$ + " on line" + NUM$(ERL)
32590	PRINT								&
\	PRINT "**************************************************"	&
\	PRINT "*                                                *"	&
\	PRINT "*                  JOB ABORTED                   *"	&
\	PRINT "*                                                *"	&
\	PRINT "*"; E$; TAB(49%);                               "*"	&
\	PRINT "*                                                *"	&
\	PRINT "**************************************************"
32767	END
